summaryrefslogtreecommitdiff
path: root/src/Fl_JPEG_Image.cxx
AgeCommit message (Collapse)Author
3 dayswipmaxim nikonov
2025-06-06Fix usage of 'volatile' in src/Fl_JPEG_Image.cxx (#1207)Albrecht Schlosser
- allocate a new struct 'load_stat' on the heap - use struct load_stat to open image file (fp) and for error counters The previous fix of #1207 unfortunately decremented volatile variables which caused (plausible) compiler warnings by clang.
2025-02-21Fix copyright, a typo, and remaining casts (#1207)Albrecht Schlosser
make remaining casts consistent with other casts of the same variables
2025-02-20Fix "Fl_JPEG_Image infinite longjmp loop on Mac release builds" (#1207)ManoloFLTK
2022-12-22Missing parenthesesMatthias Melcher
2022-12-22Fix compilation on old gcc (#606)Matthias Melcher
* Fixing char* use in FLUID * Fixing const cast
2022-12-17Adding length checks for in-memory image data (see #542) (#592)Matthias Melcher
SVG is now decompressed in memory Bitmap invalid array length handling to return an error RGB Image data reader to return error if image data is too short FLUID: Add size argument to bitmap and JPEG data
2021-04-07Remove static variable, fix gcc warning [-Wclobbered] (#203)Albrecht Schlosser
PR #203 "Multithread fix for PNG loading" includes a suggested fix that moves the variable fp to the Fl_PNG_Image structure. This commit fixes the threading issue by allocating the variable fp with new, avoiding the [-Wclobbered] warning w/o using a static var. The same issue is now also fixed in Fl_JPEG_Image.
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-10Updated image readers.Matthias Melcher
Removed duplicate code from Fl_JPEG_Image, updated and unified Doxygen comments. Avoiding name conflict in new protected functions.
2018-12-29Remove a C style type cast from jpeg_mem_src.Matthias Melcher
2018-02-09Replace "WIN32" with "_WIN32" or "Windows".Albrecht Schlosser
Replace compiler/preprocessor/platform macro "WIN32" with "_WIN32". Replace "WIN32" in text and documentation with "Windows". Replace "MSWindows" with "Windows". To do: README.Windows.txt (and maybe other documentation as well) needs updates. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12655 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-07Fixed typos in the constructors of Fl_JPEG_Image.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10743 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-07Fixed typos in doc of Fl_JPEG_Image constructors.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10742 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-06-07Fixed the doc of the Fl_JPEG_Image constructors mentioning the purpose of ↵Manolo Gouy
Fl_Image::fail(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10741 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
2015-03-15Fix 'boolean' issue with jpeg-9 library compatibility (STR #2920).Albrecht Schlosser
According to comments in STR #2920 and my own tests this is also compatible with older jpeg libraries (at least jpeg-8). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10621 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2013-09-21Fixes STR# 2973: collection of Sun compiler fixes.Greg Ercolano
Applied str_2973_r9979_sun-fix-warnings-7.patch (with small mods) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9980 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2012-11-09Fix STR#2881: the new static function Fl_RGB_Image::max_size(size) allows to ↵Manolo Gouy
control the maximum memory size allowed when creating an Fl_RGB_Image. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9709 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
2011-02-22Corrected typos.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8462 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-24Adding embedded documentation to Fluid if installed odcs are not found. ↵Matthias Melcher
Falls back to the internet if that does not exist either. Also, adds JPEG and PNG images to the Shared Image list if they were loaded from memory - see example use in fluid.cxx which loads and embedded html document containing an embedded PNG image. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8306 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-17Documentation updates (remaining fix for STR #2520).Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8288 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2011-01-13Fixed typos, added \todo ... (see STR #2520).Albrecht Schlosser
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8271 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
2010-11-18Fixed file access code to use UTF-8 strings (STR #2440)Matthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7874 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-10-30STR 2382: Fixed compile errors when HAVE_LIBJPEG was not definedMatthias Melcher
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7780 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2010-02-18Added jpeg loading from memory. Added jpeg Fl_Widget->image() support for ↵Matthias Melcher
Fluid - but linking to fltk_images is required if this feature is used! git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7092 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-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
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-08-29This is the text for the previous commit.Matthias Melcher
Fixed reading of corrupt Jpegs. The previous fix would work somewhat on VC6, but should not have worked... . The new fix looks unfamiliar, but seems to work fine. Thanks for the patch to Natevw git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4544 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-08-29git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4543 ↵Matthias Melcher
ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-07-11STR #915: fixed hang on corrupt jpegs by giving a maximum of 10 chances for ↵Matthias Melcher
jpeg lib to clean up on damaged file reads. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4410 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-04-14Eliminate compiler warnings on Solaris...Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4282 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-03-05Fl_JPEG_Image could still crash an app with a corrupt JPEG fileMichael R Sweet
(STR #739) src/Fl_JPEG_Image.cxx: - Use setjmp/longjmp to catch JPEG file errors and prevent the JPEG library from crashing the FLTK app. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4061 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
2005-02-24Fix builds without JPEG library...Michael R Sweet
src/Fl_JPEG_Image.cxx: - Surround FLTK JPEG state structure with #ifdef... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4048 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-12Fix initializers and error handling.Michael R Sweet
src/Fl_JPEG_Image.cxx: - Add custom error manager structure and update error and output handlers so we properly handle bad JPEG files. src/Fl_Shared_Image.cxx: - Add initializers for num_handlers, alloc_handlers, and handlers variables. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4040 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-02-06Fixed a VC++ compiler error in Fl_JPEG_Image.cxx (STR #676)Michael R Sweet
src/Fl_JPEG_Image.cxx: - Cast array to (uchar *) in delete[]. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4034 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2005-01-25Temporary fix for JPEG error handle; we need to flag the error inMichael R Sweet
the callback function and test for it in the main code... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2004-12-16Fl_JPEG_Image did not correctly handle errors reported by theMichael R Sweet
JPEG library (STR #652) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3946 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-09-17Don't compile JPEG error handler unless we have JPEG library...Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3107 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2003-09-15Add error handlers to JPEG and PNG image classes so the correspondingMichael R Sweet
libraries don't exit the app with a bad file (STR #168) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3105 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
2002-07-26BMP image loader fixes.Michael R Sweet
JPEG with Cygwin fix. Make sure that all generated files are removed with a "make distclean". Make sure we remove the autoconf cache directory when building the source distribution. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2551 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-05-25Tag image data as allocated so that we don't waste memory.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2257 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2002-01-15Unixware fixes.Michael R Sweet
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1931 ea41ed52-d2ee-0310-a9c1-e6b18d33e121