mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:10:48 +00:00
Handle patched jpeg library found on CYGWIN.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26802 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
975469ff71
commit
4321f46a99
2 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-08-08 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSBitmapImageRep+JPEG.m: Handle patched jpeg library
|
||||||
|
found on CYGWIN.
|
||||||
|
|
||||||
2008-08-07 18:23-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
2008-08-07 18:23-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Headers/AppKit/NSTokenFieldCell.h
|
* Headers/AppKit/NSTokenFieldCell.h
|
||||||
|
|
|
@ -50,6 +50,10 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#include <jpeglib.h>
|
#include <jpeglib.h>
|
||||||
|
#if defined(__CYGWIN__)
|
||||||
|
/* Cygwin uses a patched jpeg */
|
||||||
|
#define GSTEP_PROGRESSIVE_CODEC
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
|
@ -465,7 +469,11 @@ static void gs_jpeg_memory_dest_destroy (j_compress_ptr cinfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef GSTEP_PROGRESSIVE_CODEC
|
||||||
|
isProgressive = (cinfo.process == JPROC_PROGRESSIVE);
|
||||||
|
#else
|
||||||
isProgressive = cinfo.progressive_mode;
|
isProgressive = cinfo.progressive_mode;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* done */
|
/* done */
|
||||||
jpeg_finish_decompress(&cinfo);
|
jpeg_finish_decompress(&cinfo);
|
||||||
|
@ -599,7 +607,12 @@ static void gs_jpeg_memory_dest_destroy (j_compress_ptr cinfo)
|
||||||
progressiveNumber = [properties objectForKey: NSImageProgressive];
|
progressiveNumber = [properties objectForKey: NSImageProgressive];
|
||||||
if (progressiveNumber != nil)
|
if (progressiveNumber != nil)
|
||||||
{
|
{
|
||||||
|
#ifdef GSTEP_PROGRESSIVE_CODEC
|
||||||
|
if ([progressiveNumber boolValue])
|
||||||
|
cinfo.process = JPROC_PROGRESSIVE;
|
||||||
|
#else
|
||||||
cinfo.progressive_mode = [progressiveNumber boolValue];
|
cinfo.progressive_mode = [progressiveNumber boolValue];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue