Image *_image = NULL;
Image *_resized_image = NULL;
Image *_rotated_image = NULL;
+ Image *_write_image = NULL;
ExceptionInfo exception;
mm_util_rotate_type_e rotation = MM_UTIL_ROTATE_0;
}
}
- ret = __mm_util_write_image_to_file(((_rotated_image) ? _rotated_image : _resized_image), dst_path);
+ _write_image = (_rotated_image) ? _rotated_image : _resized_image;
+
+ /* problem. a thumbnail of grayscale image is invisible
+ add converting grayscale image into rgb(jpeg) or true color(png)
+ the rgb(jpeg) and true-color(png) are default(else case) value.
+ */
+ if (IsGrayImage(_write_image, &exception)) {
+ mm_util_info("IsGrayImage, convert image into rgb(jpeg)/true-color(png).");
+ _write_image->is_grayscale = MagickFalse;
+ }
+
+ ret = __mm_util_write_image_to_file(_write_image, dst_path);
ERROR: