4
/* A short program which converts a .png file into a .gd file, for
5
your convenience in creating images on the fly from a
6
basis image that must be loaded quickly. The .gd format
7
is not intended to be a general-purpose format. */
10
main (int argc, char **argv)
16
fprintf (stderr, "Usage: gdtopng filename.gd filename.png\n");
19
in = fopen (argv[1], "rb");
22
fprintf (stderr, "Input file does not exist!\n");
25
im = gdImageCreateFromGd (in);
29
fprintf (stderr, "Input is not in PNG format!\n");
32
out = fopen (argv[2], "wb");
35
fprintf (stderr, "Output file cannot be written to!\n");