The width and height of a GIF image might seem irrelevant to the usual programmer, but when it is required many programmers might not realize how easy it is to decode.Unlike the height and width of a JPEG file, the height of the gif is extremely easy to decode from its header. There is a manual conversion from 2 bytes to a short in this code to make it compatible for any processor and platform - a problem I acutally run into with some code while doing programming for both 68K and x86 CPUs.
________________________________________ / 'Cow says: Thank you for visiting. You \ | are browsing: Decoding the width and | | height of a GIF file. You have been to | \ 1 pages on this site today.' / ---------------------------------------- \ ,__, \ (oo)____ (__) )\ ||--|| *
All article content is copyright of Michael Petrov, 2006©.
The source code presented in the articles is distributed as freeware, please feel free to use it in your own projects - both commercial and non commercial.