offset_base = value_ptr + offset_diff;
data_len = value_len - offset_diff;
break;
+#endif
default:
case MN_OFFSET_NORMAL:
+ data_len = value_len;
break;
}
ZVAL_STRINGL(return_value, ImageInfo.Thumbnail.data, ImageInfo.Thumbnail.size);
if (arg_c >= 3) {
if (!ImageInfo.Thumbnail.width || !ImageInfo.Thumbnail.height) {
- exif_scan_thumbnail(&ImageInfo);
+ if (!exif_scan_thumbnail(&ImageInfo)) {
+ ImageInfo.Thumbnail.width = ImageInfo.Thumbnail.height = 0;
+ }
}
- zval_dtor(p_width);
- zval_dtor(p_height);
- ZVAL_LONG(p_width, ImageInfo.Thumbnail.width);
- ZVAL_LONG(p_height, ImageInfo.Thumbnail.height);
+ zval_dtor(z_width);
+ zval_dtor(z_height);
+ ZVAL_LONG(z_width, ImageInfo.Thumbnail.width);
+ ZVAL_LONG(z_height, ImageInfo.Thumbnail.height);
}
if (arg_c >= 4) {
- zval_dtor(p_imagetype);
- ZVAL_LONG(p_imagetype, ImageInfo.Thumbnail.filetype);
+ zval_dtor(z_imagetype);
+ ZVAL_LONG(z_imagetype, ImageInfo.Thumbnail.filetype);
}
#ifdef EXIF_DEBUG