12main (
int argc,
char **argv)
19 fprintf (stderr,
"Usage: gd2copypal palettefile.gd2 filename.gd2\n");
22 in =
fopen (argv[1],
"rb");
25 fprintf (stderr,
"Palette file does not exist!\n");
32 fprintf (stderr,
"Palette is not in GD2 format!\n");
36 in =
fopen (argv[2],
"rb");
39 fprintf (stderr,
"Input file does not exist!\n");
46 fprintf (stderr,
"Input is not in GD2 format!\n");
55 fprintf (stderr,
"Output file cannot be written to!\n");
fprintf($stream, string $format, mixed ... $values)
fopen(string $filename, string $mode, bool $use_include_path=false, $context=null)
void gdImageGd2(gdImagePtr im, FILE *out, int cs, int fmt)
gdImagePtr gdImageCreateFromGd2(FILE *in)
void gdImageDestroy(gdImagePtr im)
void gdImagePaletteCopy(gdImagePtr to, gdImagePtr from)
exit(string|int $status=0)