13main (
int argc,
char **argv)
24 fprintf (stderr,
"Usage: gd2time filename.gd count x y w h\n");
34 printf (
"Extracting %d times from (%d, %d), size is %dx%d\n", c, x, y, w, h);
37 for (i = 0; i < c; i++)
39 in =
fopen (argv[1],
"rb");
42 fprintf (stderr,
"Input file does not exist!\n");
51 fprintf (stderr,
"Error reading source file!\n");
57 printf (
"%d seconds to extract (& destroy) %d times\n", t0, c);
fprintf($stream, string $format, mixed ... $values)
printf(string $format, mixed ... $values)
fopen(string $filename, string $mode, bool $use_include_path=false, $context=null)
gdImagePtr gdImageCreateFromGd2Part(FILE *in, int srcx, int srcy, int w, int h)
void gdImageDestroy(gdImagePtr im)
exit(string|int $status=0)