You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
127 lines
3.3 KiB
127 lines
3.3 KiB
diff -ruN imlib-1.9.15.orig/gdk_imlib/io-gif.c imlib-1.9.15/gdk_imlib/io-gif.c
|
|
--- imlib-1.9.15.orig/gdk_imlib/io-gif.c 2014-05-27 09:38:13.210527763 +0000
|
|
+++ imlib-1.9.15/gdk_imlib/io-gif.c 2014-05-27 09:43:55.435910398 +0000
|
|
@@ -30,7 +30,7 @@
|
|
fd = fileno(f);
|
|
/* Apparently rewind(f) isn't sufficient */
|
|
lseek(fd, (long) 0, 0);
|
|
- gif = DGifOpenFileHandle(fd);
|
|
+ gif = DGifOpenFileHandle(fd, NULL);
|
|
|
|
transp = -1;
|
|
data = NULL;
|
|
@@ -43,14 +43,14 @@
|
|
{
|
|
if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
|
|
{
|
|
- PrintGifError();
|
|
+ fprintf(stderr, "giflib error: %s\n", GifErrorString(gif->Error));
|
|
rec = TERMINATE_RECORD_TYPE;
|
|
}
|
|
if ((rec == IMAGE_DESC_RECORD_TYPE) && (!done))
|
|
{
|
|
if (DGifGetImageDesc(gif) == GIF_ERROR)
|
|
{
|
|
- PrintGifError();
|
|
+ fprintf(stderr, "giflib error: %s\n", GifErrorString(gif->Error));
|
|
rec = TERMINATE_RECORD_TYPE;
|
|
}
|
|
*w = gif->Image.Width;
|
|
@@ -62,13 +62,13 @@
|
|
rows = malloc(*h * sizeof(GifRowType *));
|
|
if (!rows)
|
|
{
|
|
- DGifCloseFile(gif);
|
|
+ DGifCloseFile(gif, NULL);
|
|
return NULL;
|
|
}
|
|
data = _gdk_malloc_image(*w, *h);
|
|
if (!data)
|
|
{
|
|
- DGifCloseFile(gif);
|
|
+ DGifCloseFile(gif, NULL);
|
|
free(rows);
|
|
return NULL;
|
|
}
|
|
@@ -79,7 +79,7 @@
|
|
rows[i] = malloc(*w * sizeof(GifPixelType));
|
|
if (!rows[i])
|
|
{
|
|
- DGifCloseFile(gif);
|
|
+ DGifCloseFile(gif, NULL);
|
|
for (i = 0; i < *h; i++)
|
|
if (rows[i])
|
|
free(rows[i]);
|
|
@@ -168,7 +168,7 @@
|
|
}
|
|
}
|
|
}
|
|
- DGifCloseFile(gif);
|
|
+ DGifCloseFile(gif, NULL);
|
|
for (i = 0; i < *h; i++)
|
|
free(rows[i]);
|
|
free(rows);
|
|
diff -ruN imlib-1.9.15.orig/Imlib/load.c imlib-1.9.15/Imlib/load.c
|
|
--- imlib-1.9.15.orig/Imlib/load.c 2014-05-27 09:38:13.220527723 +0000
|
|
+++ imlib-1.9.15/Imlib/load.c 2014-05-27 09:45:25.775576104 +0000
|
|
@@ -454,7 +454,7 @@
|
|
fd = fileno(f);
|
|
/* Apparently rewind(f) isn't sufficient */
|
|
lseek(fd, (long) 0, 0);
|
|
- gif = DGifOpenFileHandle(fd);
|
|
+ gif = DGifOpenFileHandle(fd, NULL);
|
|
|
|
if (!gif)
|
|
return NULL;
|
|
@@ -462,14 +462,14 @@
|
|
{
|
|
if (DGifGetRecordType(gif, &rec) == GIF_ERROR)
|
|
{
|
|
- PrintGifError();
|
|
+ fprintf(stderr, "Imlib ERROR: JPEG uses line buffers > 16. Cannot load.\n");
|
|
rec = TERMINATE_RECORD_TYPE;
|
|
}
|
|
if ((rec == IMAGE_DESC_RECORD_TYPE) && (!done))
|
|
{
|
|
if (DGifGetImageDesc(gif) == GIF_ERROR)
|
|
{
|
|
- PrintGifError();
|
|
+ fprintf(stderr, "Imlib ERROR: JPEG uses line buffers > 16. Cannot load.\n");
|
|
rec = TERMINATE_RECORD_TYPE;
|
|
}
|
|
*w = gif->Image.Width;
|
|
@@ -481,13 +481,13 @@
|
|
rows = malloc(*h * sizeof(GifRowType *));
|
|
if (!rows)
|
|
{
|
|
- DGifCloseFile(gif);
|
|
+ DGifCloseFile(gif, NULL);
|
|
return NULL;
|
|
}
|
|
data = _imlib_malloc_image(*w, *h);
|
|
if (!data)
|
|
{
|
|
- DGifCloseFile(gif);
|
|
+ DGifCloseFile(gif, NULL);
|
|
free(rows);
|
|
return NULL;
|
|
}
|
|
@@ -498,7 +498,7 @@
|
|
rows[i] = malloc(*w * sizeof(GifPixelType));
|
|
if (!rows[i])
|
|
{
|
|
- DGifCloseFile(gif);
|
|
+ DGifCloseFile(gif, NULL);
|
|
for (i = 0; i < *h; i++)
|
|
if (rows[i])
|
|
free(rows[i]);
|
|
@@ -587,7 +587,7 @@
|
|
}
|
|
}
|
|
}
|
|
- DGifCloseFile(gif);
|
|
+ DGifCloseFile(gif, NULL);
|
|
for (i = 0; i < *h; i++)
|
|
free(rows[i]);
|
|
free(rows);
|