summaryrefslogtreecommitdiff
path: root/src/Fl_GIF_Image.cxx
AgeCommit message (Collapse)Author
43 hourswipmaxim nikonov
2023-01-21Animated GIF support (Fl_Anim_GIF_Image class) (#375)wcout
2022-09-26Replace all calls to sprintf() by calls to snprintf().ManoloFLTK
2022-04-20Improve docs of Fl_Image and related classes (#431)Albrecht Schlosser
Clarifications as discussed since April 15, 2022 07:00 UTC (see GitHub issue #431).
2021-10-02Improve GIF error handling, terminate on some errorsAlbrecht Schlosser
There's not much we can do if we find unknown data in the main parser loop. The best we can do is terminating. If we find a GIF trailer (0x3b) this means logical end of file. If we get there in the main loop the GIF file is empty (no image). This behavior is consistent with many other image viewers including browsers (Firefox and Chrome).
2021-10-02Separate Fl_GIF_Image constructors with and w/o length argAlbrecht Schlosser
Document clearly that reading from memory w/o the length argument (old constructor) is discouraged (deprecated).
2021-09-28Fix potential memory leak in GIF image reader (#271)Albrecht Schlosser
This could happen if a read error or end of file was encountered.
2021-09-27Fix and improve Fl_GIF_Image (issue #271, #274)Albrecht Schlosser
- add error and EOF checks - fix transparent pixel index outside ColorMap (#271) - fix Fl_GIF_Image decoder bug (#274) - add Fl_Image_Reader::skip(unsigned int) - use new skip() method in GIF reader
2021-03-18Fix stack corruption when loading GIFfire-eggs
2020-07-06Remove $Id$ tags, update URL's, and moreAlbrecht Schlosser
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
2020-01-13Combine image readers in class Fl_Image_ReaderAlbrecht Schlosser
This new class is explicitly internal and undocumented. We can rename and/or redefine or extend it as we need. This work is based on Matt's recent update with separate internal classes BMPReader and GIFReader which have been replaced by Fl_Image_Reader.
2020-01-10Updated image readers.Matthias Melcher
Removed duplicate code from Fl_JPEG_Image, updated and unified Doxygen comments. Avoiding name conflict in new protected functions.
2020-01-05Fix Doxygen description of the constructors.ManoloFLTK
2020-01-03Added code to read GIF files from memory (GitHub issue #33, 2/2)Matthias Melcher
2019-01-09Fix Fl_GIF_Image Color Table handling (STR 3491)Albrecht Schlosser
Loading GIF images could crash if there was no "Global Color Table" but individual "Local Color Tables" with individual images. Now local color tables are used correctly if available, but images that lack both global and local color tables are being loaded with a default (gray) color table and a warning is issued with Fl::warning(). The default color table uses black and white in the first two indices as recommended by the standard. Cherry-picked from: 35e03733f48397819902a4ef2ebff9bcb8676f54
2015-06-14Minor documentation fixes.Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10751 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-05-23STR #2873: new function Fl_Image::fail() that returns 0, ERR_NO_IMAGE, ↵Matthias Melcher
ERR_FORMAT, or ERR_FILE_ACCESS to make life easier when loading images. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10732 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-07-19Modifications to all LGPL headers for STR #2685.Greg Ercolano
(to clarify static exception LGPL by changing license references) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-11-28Fixed Copyright to 2010.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2009-01-01Changed Copyright in 'src' directoryMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6616 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-19Updating fl_utf8.h references. Fixing copyright date in .fl files.Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6311 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-14Doxygen Documentation WP5 Done, WP6 half finished so that all Fl_Image class ↵Fabien Costantini
hierarchy is up-to-date. Also completed the documentation of the useful Fl_Shared_Image. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2008-09-10Merging the UTF8 patch, consisting of O'ksi'd s original 1.1.6 patch and ↵Matthias Melcher
additions by Ian. PLEASE BE AWARE that the patch in its current incarnation is a regression in many aspects and further work is required before we can announce Unicode support. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2007-05-20Fix all compiler warnings from various build systems.Michael R Sweet
Fix vsnprintf() implementation to properly handle long and long long ints. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-11-27Update dependencies.Michael R Sweet
Eliminate compiler warnings in Fl_GIF_Image.cxx. Add X11 icon code to sudoku example. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4661 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-08-08Fl_GIF_Image did not handle images with an incorrect number ofMichael R Sweet
data bits (STR #914) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4480 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-04-16Update source file headers with STR web page.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-24Copyright updates.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-04-11Copyright updates and prep for 1.1.5rc1.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3391 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-30Copyright update for 1.1.3 release (not quite yet, but soon...)Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-01-12Fix use of free() for memory allocated using new.Michael R Sweet
Fix error messages to use Fl::error() instead of fprintf(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2898 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-11-19Get rid of some valid compiler warnings with CodeWarrior that were reportedMichael R Sweet
by Paul Chambers. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2845 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-25Clean up string includes.Michael R Sweet
Fix Fl_Shared_Image::add_handler() and friends. Fix Fl_PNM_Image loader. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2260 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-04-11Make Fl_Output a subclass of Fl_Input, and add input_type and readonlyMichael R Sweet
methods/constants to support Fl_Output as a special case of Fl_Input (you can do everything but change the text in Fl_Output...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-07Fixed from Teun.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1919 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-01Copyright updates...Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-12-21Casts to make old IRIX 5.3 C++ compiler happy...Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1892 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-12-19Multiple bug fixes from Sebastien:Michael R Sweet
- Fl_GIF_Image and Fl_PNG_Image didn't close the file before calling Fl::error(). - Fl_Help_View didn't clear the line array in Fl_Help_Block, and Fl_Help_Block::font and ::size were not used. - Fl_Shared_Image::get() didn't return NULL if the image could not be loaded. - Switched to more efficient code for Fl_Tiled_Image::color_average() and ::desaturate(). - Don't delete children in Fl_Text_Display since the group will do it. - Fixes to filename_isdir(), filename_absolute(), and filename_relative(). - Was using numbers instead of define constants for some OpenGL stuff under WIN32. - Wasn't exporting threading functions under WIN32. - The Fl_Widget destructor now removes from the parent to avoid a Purify error since the old widget would be referenced by the parent when it was destroyed; this has no apparent performance impact since Fl_Group::clear() sets children_ to 0, making Fl_Group::remove() very fast... - WIN32 font enumeration datatype fixes... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1878 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-12-11Multiple fixes from Sebastien.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-24Added XBM, XPM, and PNM image file classes.Michael R Sweet
The pixmap_browser demo now supports all image formats via Fl_Shared_Image. Dropped image file stuff from image demo. Added Fl_Tiled_Image class, which tiles an Fl_Image, useful for tiling a background image in groups. Added tiled_image demo. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1725 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-24Fix bugs in copy() methods.Michael R Sweet
Add Fl_Shared_Image class, with get() and release() methods. Update Fl_Help_View to use Fl_Shared_Image class. Update image demo to accept a filename, and to use the Fl_Shared_Image class. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1714 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-22Fix all references to '.C' files (now .cxx)Michael R Sweet
Update Fl_Image() class to track depth and data, so FLUID will be able to use it as the base class. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1712 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-20GIF loading code from FLUID.Michael R Sweet
Remove old WIN32 mask code that is no longer needed. Fix "compressed" colormap code in Fl_Pixmap.cxx. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1708 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2001-11-19OK, lots of changes to the Fl_Image, Fl_Bitmap, Fl_Pixmap, and Fl_RGB_ImageMichael R Sweet
classes: new copy(), copy(w,h), desaturate(), color_average(), and inactive() methods, alloc_xyz member for copied data, etc. Updated test programs to use inactive() and copy() methods to create inactive images for the test buttons, plus the inactive button to toggle it... Added start of separate image classes, a la 2.0, for various image formats. FLUID will also be updated for it... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1703 ea41ed52-d2ee-0310-a9c1-e6b18d33e121