}
switch (image_type) {
- case PHP_GDIMG_CONVERT_WBM:
- if (q == -1) {
- q = 0;
- } else if (q < 0 || q > 255) {
- php_error_docref(NULL, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q);
- q = 0;
- }
- gdImageWBMP(im, q, fp);
- break;
case PHP_GDIMG_TYPE_GD:
(*func_p)(im, fp);
break;
}
switch (image_type) {
- case PHP_GDIMG_CONVERT_WBM:
- if (q == -1) {
- q = 0;
- } else if (q < 0 || q > 255) {
- php_error_docref(NULL, E_WARNING, "Invalid threshold value '%d'. It must be between 0 and 255", q);
- q = 0;
- }
- gdImageWBMP(im, q, tmp);
- break;
case PHP_GDIMG_TYPE_GD:
(*func_p)(im, tmp);
break;
#define PHP_GDIMG_TYPE_WBM 4
#define PHP_GDIMG_TYPE_XBM 5
#define PHP_GDIMG_TYPE_XPM 6
-#define PHP_GDIMG_CONVERT_WBM 7
#define PHP_GDIMG_TYPE_GD 8
#define PHP_GDIMG_TYPE_GD2 9
#define PHP_GDIMG_TYPE_GD2PART 10