FLTK logo

Re: [fltk/fltk] Fl_Image_Reader::read_byte() does not return EOF with file reads (#271)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: [fltk/fltk] Fl_Image_Reader::read_byte() does not return EOF with file reads (#271) wcout Sep 28, 2021  
 

the error message "unknown GIF code 0x..." is in a context (the main read loop) where only a few different codes are to be expected. I read the "grammar" in the GIF spec (Appendix B) and I believe that finding other codes in this place is a serious error, i.e. a broken GIF file.

After reading up now...you are right, this is not the place for block skipping. Thanks for your explanations!

Since we don't read "subsequent Data Streams" this is a moot point and we should exit gracefully - but I don't know yet what to do with the image object. Mark it as invalid (ERR_FORMAT) or create an image with w() = h() = d() = ld() = 0?

The GIF viewers I tested with, treat it as an invalid GIF. This seems to me also the best solution in order to discern this case from image descriptor with zero width/height.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.