2018-09-09 7.0.8-12 Cristy <quetzlzacatenango@image...>
* Release ImageMagick version 7.0.8-12, GIT revision 14729:798fbdb5b:20180828
+2018-09-15 7.0.8-12 Dirk Lemstra <dirk@lem.....org>
+ * Added support for arithmetic coding to the jpeg encoder:
+ -define jpeg:arithmetic-coding=true.
+
2018-09-08 7.0.8-12 Cristy <quetzlzacatenango@image...>
* Fixed numerous use of uninitialized values, integer overflow, memory
exceeded, and timeouts (credit to OSS Fuzz).
(void) FormatLocaleString(value,MagickPathExtent,"%.20g",(double)
jpeg_info.out_color_space);
(void) SetImageProperty(image,"jpeg:colorspace",value,exception);
+#if defined(D_ARITH_CODING_SUPPORTED)
+ if (jpeg_info.arith_code == TRUE)
+ (void) SetImageProperty(image,"jpeg:coding","arithmetic",exception);
+#endif
if (image_info->ping != MagickFalse)
{
jpeg_destroy_decompress(&jpeg_info);
jpeg_info.optimize_coding=status == MagickFalse ? FALSE : TRUE;
}
}
+#if defined(C_ARITH_CODING_SUPPORTED)
+ option=GetImageOption(image_info,"jpeg:arithmetic-coding");
+ if (option != (const char *) NULL)
+ {
+ jpeg_info.arith_code=IsStringTrue(option) != MagickFalse ? TRUE : FALSE;
+ jpeg_info.optimize_coding=FALSE; // Not supported.
+ }
+#endif
#if (JPEG_LIB_VERSION >= 61) && defined(C_PROGRESSIVE_SUPPORTED)
if ((LocaleCompare(image_info->magick,"PJPEG") == 0) ||
(image_info->interlace != NoInterlace))