int i, j, k, number;
char buf[5];
gdImagePtr im = 0;
- char *apixel;
int *pointer;
int red = 0, green = 0, blue = 0;
int *colors;
}
if (!(im = gdImageCreate(image.width, image.height))) {
- return 0;
+ goto done;
}
number = image.ncolors;
colors[i] = gdImageColorResolve(im, red, green, blue);
- if (colors[i] == -1) {
- php_gd_error("ARRRGH");
- }
}
- apixel = (char *) gdMalloc(image.cpp + 1);
- apixel[image.cpp] = '\0';
-
pointer = (int *) image.data;
for (i = 0; i < image.height; i++) {
for (j = 0; j < image.width; j++) {
}
}
- gdFree(apixel);
gdFree(colors);
+ done:
+ XpmFreeXpmImage(&image);
+ XpmFreeXpmInfo(&info);
return im;
}
#endif