This is what I have to-do to get the result doesnt seem correct though..
$short = @reset(unpack('n',$data));
$normal = hexdec(bin2hex(unpack('n',-$short)));
What I do is unpack the binary code as "unsigned short (always 16 bit, big endian byte order)"
Then I negate it then convert it to hex...
According the Adobe Photoshop file specification they use the big endian format.
So a value of 2 should be displaying as 0002 just suprised its not.
Could you show me a PHP example of how to negate and subtract?
Also to follow up i noticed the 65533 I have tried it and didnt understand then I started adding more layers and looking at the hex values and noticed it was doing it backwards.
Well take a look at how its doing it backwards
In hex FFFF is the highest you can go correct?
Now the second highest would be FFFE
then FFFD
FFFF = 0
FFFE = 1
FFFD = 2
FFFC = 3
I am not sure why photoshop is doing it backwards like this?
This is kind of weird im trying to pull the number of layers from a .psd file.
I get to the section where it contains the information. Its a 2 byte section (short integer)
But it looks like this in hex
FF FD and some how its suppose to equal 2?
FF FC = 3
FF FB = 4
& so forth it seems...
Hi I really dont understand this check this out..
Field exclude has been dropped (Query took 5.8564 sec)
SQL query:
ALTER TABLE `_teamContest` DROP `exclude`
This table has 0 rows and it takes 6 seconds to drop it??!?
Why would it take so long to drop a row I am quite confised by this.
Actually its been running fine all day today.. I dont know why but it seems to be workiing now =/. But it did it like 20 times last night.
yes we are running unix.. also I just played with exim a little but I shut exim off and the problem still occured.. but it was the only problem I was having.
Well its not in our logs because its stuck on just reading the request. Its not like somone is sending us 1,000 at once.. it sends us one request and it gets stuck on it for a long time.
<Location /statusqwerty>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 67.149.101.251
</Location>
Its the server status log.. but for some reason all the connection slots get filled with these reading requests and it locks everyone out.
Hi we have a problem with our Apache server. Every once in a while our Apache server will stop responding for like 10 minutes.. its running fine but it will just not respond and load a blank page for 5 minutes and fail. All i do is restart apache and all is normal.
Anyone ever heard of this...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.