[VB6] disposed animated gif files
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 15

Thread: [VB6] disposed animated gif files

  1. #1
    Join Date
    Apr 2009
    Posts
    626

    [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
    Attached Files Attached Files

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,091

    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

  3. #3
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,722

    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.

  4. #4
    Join Date
    Apr 2009
    Posts
    394

    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

  5. #5
    Join Date
    Apr 2009
    Posts
    626

    Re: [VB6] disposed animated gif files

    Quote Originally Posted by vb5prgrmr View Post
    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
    thanks for these excelent code
    i don't have sure if can read disposed files, but i will test it
    thanks

  6. #6
    Join Date
    Apr 2009
    Posts
    626

    Re: [VB6] disposed animated gif files

    sorry... my actual function can read more animated gif files
    i continue with same problem

  7. #7
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,722

    Re: [VB6] disposed animated gif files

    still it is not quite clear what your actual problem is...

  8. #8
    Join Date
    Apr 2009
    Posts
    626

    Re: [VB6] disposed animated gif files

    Quote Originally Posted by WoF View Post
    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
    Attached Images Attached Images  
    Attached Files Attached Files

  9. #9
    Join Date
    Apr 2009
    Posts
    626

    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
    Attached Files Attached Files

  10. #10
    Join Date
    Apr 2009
    Posts
    626

    Re: [VB6] disposed animated gif files

    heres a simple example for try help.
    thanks
    Attached Files Attached Files

  11. #11
    Join Date
    Apr 2009
    Posts
    626

    Re: [VB6] disposed animated gif files

    Quote Originally Posted by HanneSThEGreaT View Post
    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?

  12. #12
    Join Date
    Apr 2009
    Posts
    394

    Re: [VB6] disposed animated gif files


  13. #13
    Join Date
    Apr 2009
    Posts
    626

    Re: [VB6] disposed animated gif files

    Quote Originally Posted by vb5prgrmr View Post
    is more or less like "prefer"(i know these because i coud find the portuguese translation and more), but depends on context.
    thanks

  14. #14
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,091

    Re: [VB6] disposed animated gif files

    Actually Instead of would have been better, from my side...

  15. #15
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,722

    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..."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center