Results 1 to 40 of 271

Thread: [VB6] - animated gif function errors:(

Threaded View

  1. #11
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: [VB6] - animated gif function errors:(

    Code:
                                          +---- GIF Header ---+
                                          |                   |
     Packed byte -------------------------|--------------+    | 
     Logical Screen Height ---------------|------------+ |    |
     Logical Screen Width ----------------|---------+  | |    |
                                          |         |  | |    |
                                          +---+---+--+--+-+-+-+
                                          |GIF|89a|  |  | | | |
                                          +---+---+--+--+-+-+-+    
                                                         | | | 
                                                         | | + -- Pixel Aspect Ratio 
                                                         | + ---- Background Color Index
                                                         |
     Global Color Table Size ----------------------+     |
     Sort Flag --------------------------------+   |     |
     Color Resolution ---------------------+   |   |     |
     Global Color Table Flag ----------+   |   |   |     |
                                       |   |   |   |     |
                                       |   |   |   |     |
                                       7 6 5 4 3 2 1 0   |                                              
                                      +-+-----+-+-----+  |                                                              
                                      | |     | |     | -+
                                      +-+-----+-+-----+
                                       |       |
                                       |       + --- 0 Table not sorted
                                       |             1 Table is sorted decreasing importance, most important color first.
                                       |
                                       + 
                                       1 = Global Color Table - Use next byte as index for Background Color
                                       0 = No Global Color Table - Next byte is meaningless                                     
    
      Size of Global Color Table       3 * (2 ^ ((Value of bits 2 1 0) + 1))
    You say you are looking at a 91. Now is that a Decimal 91 (same as Ascii) or is it &H91?

    Assuming it is &H91 then you have this:

    91 = 1000 0001

    Now look at above table I posted and you can see that the high bit is on so therefore you have a Global Color Table and because the last three bit are 001 that says you color table is only 1 which doesn't make sense.

    Now if it is Ascii 91 then that means it is &H5B and 5B = 0101 1011

    And that says the high bit is off so there is no Global Color Table

    Which GIF file are you looking at?
    Last edited by jmsrickland; Aug 16th, 2012 at 01:02 PM.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

Posting Permissions

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



Click Here to Expand Forum to Full Width