summaryrefslogtreecommitdiff
path: root/tests/gif/gif_nocolormaps.c
blob: 6aa36f0bd58649dc74e1aba34aea3ca3a86b16cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
 * Ensure that a GIF without any Global or Local color tables is still decoded
 *
 * GIF89a spec indicates conforming image files need not have Global or Local color tables at all
 *
 * See also:	https://www.w3.org/Graphics/GIF/spec-gif89a.txt
 *		http://probablyprogramming.com/2009/03/15/the-tiniest-gif-ever
 */

#include "gd.h"
#include "gdtest.h"

int main()
{
	gdImagePtr im;
	FILE *fp;

	fp = gdTestFileOpen2("gif", "gif_nocolormaps.gif");
	gdTestAssert(fp != NULL);
	im = gdImageCreateFromGif(fp);
	gdTestAssert(im != NULL);
	fclose(fp);
    gdImageDestroy(im);

	return gdNumFailures();
}