home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / gfx / edit / amigaxv / docs / gif.aspect < prev    next >
Text File  |  1993-04-23  |  3KB  |  55 lines

  1. XV also supports the GIF 'aspect ratio' extension that was discussed on 
  2. comp.graphics.  Here's the description:
  3. ----------------------------------------------------------------------------
  4.  
  5. There was quite a discussion in comp.graphics a few weeks ago, with a
  6. lot of people complaining about GIF images coming with many different
  7. aspect ratios, but no indication what the initial aspect ratio was.
  8.  
  9. Several suggestions were made, the best of which was Chris Schoeneman
  10. (i think) suggesting the following extension block be added to specify
  11. the aspect ratio:
  12. #   7 6 5 4 3 2 1 0   Byte #
  13. #  +---------------+
  14. #  |0 0 1 0 0 0 0 1|    1        '!' - GIF extension block introducer
  15. #  +---------------+
  16. #  |0 1 0 1 0 0 1 0|    2        'R' - For 'aspect Ratio'
  17. #  +---------------+
  18. #  |0 0 0 0 0 0 1 0|    3         2  - Two bytes in block
  19. #  +---------------+
  20. #  |  pixel width  |    4            - First part of ratio (numerator)
  21. #  +---------------+
  22. #  | pixel height  |    5            - Second part of ratio (denominator)
  23. #  +---------------+
  24. #  |0 0 0 0 0 0 0 0|    6         0  - extension block end code
  25. #  +---------------+
  26. #
  27. #Let byte four equal 'x' and byte five equal 'y'  Then x:y is the _pixel_
  28. #aspect ratio.  'x' and 'y' should be relatively prime (ie they should
  29. #have no common divisor except one), but they don't have to be.
  30.  
  31. Jef Paskanzer [of PBMPLUS fame]  modified his
  32. gif decoder to recognize this. I also modified my own, not that I count :-)
  33. Jef and I cross-checked ours and these diffs are compatible with both.
  34.  
  35. This code, by the way, isn't terrible robust, and will only skip extensions
  36. found BEFORE the image separator, but it is a lot better than nothing.
  37.  
  38. Since then, there has been a seemingly official announcement about a GIF89a
  39. standard from CompuServe, and the possibility of both GIF's becoming outlawed
  40. because of the Unisys LZW patent,  etc. etc. etc. oh, well... life goes on.
  41.  
  42. anyway... I hope this is of some help. you are welcome to post these patches
  43. to wherever is appropriate (i didnt do a patch on patchlevel.h, b.t.w.), or
  44. incorporate them into your new program, or whatever. I relinquish all claims,
  45. etc. etc.
  46.  
  47. -steve
  48. -------------------------------------------------------+"Come, Watson, come!"
  49.  Steve Swales                (716) 275-0265,-3857,-5101| he cried. "The game is
  50.  steve@bat.lle.rochester.edu           (128.151.32.111)| afoot. Not a word!
  51.  {decvax,harvard,ames,rutgers}!rochester!ur-laser!steve| Into your clothes and
  52.  University of Rochester            250 East River Road| come!"        S.H.
  53.  Laboratory for Laser Energetics    Rochester, NY 14623|     'The Abbey Grange'
  54.  
  55.