1 Attachment(s)
[VB6] disposed animated gif files
i have 1 module for read diposed animated gif files.
but i belive that i have some errors on it:(
heres the code for read the disposed value:
Code:
DisposalCode(TotalFrames) = ((Asc(Mid$(sBuff, lngFind + 4, 1)) \ 4) And 3)
i belive that isn't right by some reason
0 - normal animation;
1 - frame1 + frame2(these frame has the same size)(transparent);
2 - frame1 + frame2(only part of the image for be changed)(transparent).
(at least i belive that these is the right "formulas")
can anyone help me?
thanks
Re: [VB6] disposed animated gif files
OK, so you expect us to find and fix all your errors ¿
Rather tell us what is giving you the errors, when and how
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.
Re: [VB6] disposed animated gif files
Here is a link to a thread to where I found some code on PSC to decode and display animated gifs... I also think that you will find the rest of the discussion in the thread interesting...
http://www.tek-tips.com/viewthread.c...=568832&page=1
Good Luck
Re: [VB6] disposed animated gif files
Quote:
Originally Posted by
vb5prgrmr
thanks for these excelent code;)
i don't have sure if can read disposed files, but i will test it;)
thanks
Re: [VB6] disposed animated gif files
sorry... my actual function can read more animated gif files;)
i continue with same problem:(
Re: [VB6] disposed animated gif files
still it is not quite clear what your actual problem is...
2 Attachment(s)
Re: [VB6] disposed animated gif files
Quote:
Originally Posted by
WoF
still it is not quite clear what your actual problem is...
that image is an example of disposed animated gif files.
but i'm trying read them, but i continue with problems:(
1 Attachment(s)
Re: [VB6] disposed animated gif files
ok.. finally is almost corrected;)
my problem is that if every frame are 1(disposed method value), how can i see if the frame is complete(in that gif the 2 and 3 are both complete frames(don't need be combined))?.
(heres the function apdated;)).
(if is needed, i can put a complet example)
thanks
1 Attachment(s)
Re: [VB6] disposed animated gif files
heres a simple example for try help.
thanks
Re: [VB6] disposed animated gif files
Quote:
Originally Posted by
HanneSThEGreaT
OK, so you expect us to find and fix all your errors ¿
Rather tell us what is giving you the errors, when and how
sorry... but what is Rather?
Re: [VB6] disposed animated gif files
Re: [VB6] disposed animated gif files
Quote:
Originally Posted by
vb5prgrmr
is more or less like "prefer"(i know these because i coud find the portuguese translation and more), but depends on context.
thanks
Re: [VB6] disposed animated gif files
Actually Instead of would have been better, from my side... ;)
Re: [VB6] disposed animated gif files
If I may add to the dictionary topic:
Even 'better' would rather have been better. Like in "Better tell us what..." ;)