5
/* A short program which converts a .png file into a .gd file, for
6
your convenience in creating images on the fly from a
7
basis image that must be loaded quickly. The .gd format
8
is not intended to be a general-purpose format. */
11
main (int argc, char **argv)
17
fprintf (stderr, "Usage: pngtogd filename.png filename.gd\n");
20
in = fopen (argv[1], "rb");
23
fprintf (stderr, "Input file does not exist!\n");
26
im = gdImageCreateFromPng (in);
30
fprintf (stderr, "Input is not in PNG format!\n");
33
out = fopen (argv[2], "wb");
36
fprintf (stderr, "Output file cannot be written to!\n");