|
-
January 27th, 2010, 08:51 AM
#4
Re: [VB6] disposed animated gif files
Code:
DisposalCode(TotalFrames) = ((Asc(Mid$(sBuff, lngFind + 4, 1)) \ 4) And 3)
This takes a byte at the position lngFind+4, shifts it right by 2 bits and masks the last two bits.
The result of this operation can be a value from 0 to 3.
The value was contained there in a byte: xxxxccxx, where cc denote the bits of the disposal code.
I don't understand how you compute lngFind, because this value +4 makes the actual pointer to the byte read.
Unfortunately, I don't know the format of the gif files so I don't know right from wrong here, but I can definitely say,
the result of the above operation gives either 0, 1, or 2, or even 3 if that is a valid disposal code, too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|