mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
Adapt for newer libgif versions of EGifOpen and renamed GifMakeMapObject.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37369 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0bd1257321
commit
6c7e20737f
2 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-11-08 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Source/NSBitmapImageRep+GIF.m:
|
||||
Adapt for newer libgif versions of EGifOpen and renamed GifMakeMapObject.
|
||||
|
||||
2013-11-05 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/GSThemeDrawing.m (-highlightTableViewSelectionInClipRect:...):
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
|
||||
#if HAVE_LIBUNGIF || HAVE_LIBGIF
|
||||
|
||||
|
||||
/*
|
||||
gif_lib.h (4.1.0b1, possibly other versions) uses Object as the name of an
|
||||
argument to a function. This causes a conflict with Object declared by the
|
||||
|
@ -468,7 +469,11 @@ static int gs_gif_output(GifFileType *file, const GifByteType *buffer, int len)
|
|||
// If you have a color table, you must be certain that it is GIF format
|
||||
colorTable = [self valueForProperty: NSImageRGBColorTable]; // nil is OK
|
||||
colorMapSize = (colorTable)? [colorTable length]/sizeof(GifColorType) : 256;
|
||||
#if GIFLIB_MAJOR >= 5
|
||||
GIFColorMap = GifMakeMapObject(colorMapSize, [colorTable bytes]);
|
||||
#else
|
||||
GIFColorMap = MakeMapObject(colorMapSize, [colorTable bytes]);
|
||||
#endif
|
||||
if (!GIFColorMap)
|
||||
{
|
||||
SET_ERROR_MSG(@"GIFRepresentation (giflib): MakeMapObject() failed.");
|
||||
|
@ -510,7 +515,11 @@ static int gs_gif_output(GifFileType *file, const GifByteType *buffer, int len)
|
|||
free(GIFImage);
|
||||
return nil;
|
||||
}
|
||||
#if GIFLIB_MAJOR >= 5
|
||||
GIFFile = EGifOpen(GIFRep, gs_gif_output, NULL);
|
||||
#else
|
||||
GIFFile = EGifOpen(GIFRep, gs_gif_output);
|
||||
#endif
|
||||
status = EGifPutScreenDesc(GIFFile, width, height, 8, 0, NULL);
|
||||
if (status == GIF_ERROR)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue