mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 02:10:49 +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
7b78ff24ba
commit
c43f72954e
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>
|
2013-11-05 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Source/GSThemeDrawing.m (-highlightTableViewSelectionInClipRect:...):
|
* Source/GSThemeDrawing.m (-highlightTableViewSelectionInClipRect:...):
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
|
|
||||||
#if HAVE_LIBUNGIF || HAVE_LIBGIF
|
#if HAVE_LIBUNGIF || HAVE_LIBGIF
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
gif_lib.h (4.1.0b1, possibly other versions) uses Object as the name of an
|
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
|
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
|
// If you have a color table, you must be certain that it is GIF format
|
||||||
colorTable = [self valueForProperty: NSImageRGBColorTable]; // nil is OK
|
colorTable = [self valueForProperty: NSImageRGBColorTable]; // nil is OK
|
||||||
colorMapSize = (colorTable)? [colorTable length]/sizeof(GifColorType) : 256;
|
colorMapSize = (colorTable)? [colorTable length]/sizeof(GifColorType) : 256;
|
||||||
|
#if GIFLIB_MAJOR >= 5
|
||||||
|
GIFColorMap = GifMakeMapObject(colorMapSize, [colorTable bytes]);
|
||||||
|
#else
|
||||||
GIFColorMap = MakeMapObject(colorMapSize, [colorTable bytes]);
|
GIFColorMap = MakeMapObject(colorMapSize, [colorTable bytes]);
|
||||||
|
#endif
|
||||||
if (!GIFColorMap)
|
if (!GIFColorMap)
|
||||||
{
|
{
|
||||||
SET_ERROR_MSG(@"GIFRepresentation (giflib): MakeMapObject() failed.");
|
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);
|
free(GIFImage);
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
#if GIFLIB_MAJOR >= 5
|
||||||
|
GIFFile = EGifOpen(GIFRep, gs_gif_output, NULL);
|
||||||
|
#else
|
||||||
GIFFile = EGifOpen(GIFRep, gs_gif_output);
|
GIFFile = EGifOpen(GIFRep, gs_gif_output);
|
||||||
|
#endif
|
||||||
status = EGifPutScreenDesc(GIFFile, width, height, 8, 0, NULL);
|
status = EGifPutScreenDesc(GIFFile, width, height, 8, 0, NULL);
|
||||||
if (status == GIF_ERROR)
|
if (status == GIF_ERROR)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue