blob: 289debc541ebbf984a6f45b16f9eb6c3ba57ab03 (
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
27
28
29
30
|
/* $Id$ */
#include "gd.h"
#include <stdio.h>
#include <stdlib.h>
#include "gdtest.h"
int main()
{
gdImagePtr im;
FILE *fp;
char path[1024];
sprintf(path, "%s/gd2/empty.gd2", GDTEST_TOP_DIR);
fp = fopen(path, "rb");
if (!fp) {
printf("failed, cannot open file (%s)\n", path);
return 1;
}
im = gdImageCreateFromGd2(fp);
fclose(fp);
if (!im) {
return 0;
} else {
gdImageDestroy(im);
return 1;
}
}
|