never have done this. This broke the general logic of size
hint handling.
+2012-07-19 Jiyoun Park(jypark)
+
+ * Fix jpeg save bug related with error handler
+
static int
save_image_jpeg(RGBA_Image *im, const char *file, int quality)
{
- struct _JPEG_error_mgr jerr;
struct jpeg_compress_struct cinfo;
+ struct _JPEG_error_mgr jerr;
FILE *f;
DATA8 *buf;
DATA32 *ptr;
{
return 0;
}
+ memset(&cinfo, 0, sizeof(cinfo));
+ cinfo.err = jpeg_std_error(&(jerr.pub));
jerr.pub.error_exit = _JPEGFatalErrorHandler;
jerr.pub.emit_message = _JPEGErrorHandler2;
jerr.pub.output_message = _JPEGErrorHandler;
- cinfo.err = jpeg_std_error(&(jerr.pub));
if (sigsetjmp(jerr.setjmp_buffer, 1))
{
jpeg_destroy_compress(&cinfo);