From: Glenn Randers-Pehrson Date: Wed, 26 Jul 2017 23:12:31 +0000 (-0400) Subject: Removed vpAg chunk write support (we are now writing caNv instead). X-Git-Tag: 7.0.6-4~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5eb931418b65ea2906a97c44a7ed674e1a643142;p=imagemagick Removed vpAg chunk write support (we are now writing caNv instead). --- diff --git a/ChangeLog b/ChangeLog index 908517d43..69ed755c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,6 +13,7 @@ * Removed many redundant checks before RelinquishMagickMemory(), which is safe to call with a NULL argument. * Added experimental PNG orNT chunk, to store image->orientation. + * Removed vpAg chunk write support (we are now writing caNv instead). 2017-07-24 7.0.6-3 Cristy * Release ImageMagick version 7.0.6-3, GIT revision 20598:cc9c43b44:20170724. diff --git a/coders/png.c b/coders/png.c index cacc3030a..c0097f858 100644 --- a/coders/png.c +++ b/coders/png.c @@ -816,7 +816,6 @@ typedef struct _MngInfo ping_exclude_sRGB, ping_exclude_tEXt, ping_exclude_tRNS, - ping_exclude_vpAg, ping_exclude_caNv, ping_exclude_zCCP, /* hex-encoded iCCP */ ping_exclude_zTXt, @@ -4116,17 +4115,6 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, (void) SetImageProperty(image,"png:caNv",msg, exception); } - - /* vpAg chunk: */ - if ((image->page.width != 0 && image->page.width != image->columns) || - (image->page.height != 0 && image->page.height != image->rows)) - { - (void) FormatLocaleString(msg,MagickPathExtent, - "width=%.20g, height=%.20g", - (double) image->page.width,(double) image->page.height); - (void) SetImageProperty(image,"png:vpAg",msg, - exception); - } } /* @@ -8235,7 +8223,6 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, ping_exclude_tEXt, ping_exclude_tIME, /* ping_exclude_tRNS, */ - ping_exclude_vpAg, ping_exclude_caNv, ping_exclude_zCCP, /* hex-encoded iCCP */ ping_exclude_zTXt, @@ -8397,7 +8384,6 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, ping_exclude_tEXt=mng_info->ping_exclude_tEXt; ping_exclude_tIME=mng_info->ping_exclude_tIME; /* ping_exclude_tRNS=mng_info->ping_exclude_tRNS; */ - ping_exclude_vpAg=mng_info->ping_exclude_vpAg; ping_exclude_zCCP=mng_info->ping_exclude_zCCP; /* hex-encoded iCCP in zTXt */ ping_exclude_zTXt=mng_info->ping_exclude_zTXt; @@ -11123,26 +11109,6 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, } #endif - /* write vpAg chunk (deprecated, replaced by caNv) */ - if (ping_exclude_vpAg == MagickFalse && ping_wrote_caNv == MagickFalse) - { - if ((image->page.width != 0 && image->page.width != image->columns) || - (image->page.height != 0 && image->page.height != image->rows)) - { - unsigned char - chunk[14]; - - (void) WriteBlobMSBULong(image,9L); /* data length=8 */ - PNGType(chunk,mng_vpAg); - LogPNGChunk(logging,mng_vpAg,9L); - PNGLong(chunk+4,(png_uint_32) image->page.width); - PNGLong(chunk+8,(png_uint_32) image->page.height); - chunk[12]=0; /* unit = pixels */ - (void) WriteBlob(image,13,chunk); - (void) WriteBlobMSBULong(image,crc32(0,chunk,13)); - } - } - #if (PNG_LIBPNG_VER == 10206) /* avoid libpng-1.2.6 bug by setting PNG_HAVE_IDAT flag */ #define PNG_HAVE_IDAT 0x04 @@ -12188,7 +12154,6 @@ static MagickBooleanType WritePNGImage(const ImageInfo *image_info, mng_info->ping_exclude_tEXt=MagickFalse; mng_info->ping_exclude_tIME=MagickFalse; mng_info->ping_exclude_tRNS=MagickFalse; - mng_info->ping_exclude_vpAg=MagickFalse; mng_info->ping_exclude_zCCP=MagickFalse; /* hex-encoded iCCP in zTXt */ mng_info->ping_exclude_zTXt=MagickFalse; @@ -12397,7 +12362,6 @@ static MagickBooleanType WritePNGImage(const ImageInfo *image_info, mng_info->ping_exclude_tEXt=excluding; mng_info->ping_exclude_tIME=excluding; mng_info->ping_exclude_tRNS=excluding; - mng_info->ping_exclude_vpAg=excluding; mng_info->ping_exclude_zCCP=excluding; mng_info->ping_exclude_zTXt=excluding; } @@ -12433,8 +12397,6 @@ static MagickBooleanType WritePNGImage(const ImageInfo *image_info, MagickTrue; mng_info->ping_exclude_tRNS=excluding != MagickFalse ? MagickFalse : MagickTrue; - mng_info->ping_exclude_vpAg=excluding != MagickFalse ? MagickFalse : - MagickTrue; mng_info->ping_exclude_zCCP=excluding != MagickFalse ? MagickFalse : MagickTrue; mng_info->ping_exclude_zTXt=excluding != MagickFalse ? MagickFalse : @@ -12488,9 +12450,6 @@ static MagickBooleanType WritePNGImage(const ImageInfo *image_info, if (IsOptionMember("trns",value) != MagickFalse) mng_info->ping_exclude_tRNS=excluding; - if (IsOptionMember("vpag",value) != MagickFalse) - mng_info->ping_exclude_vpAg=excluding; - if (IsOptionMember("zccp",value) != MagickFalse) mng_info->ping_exclude_zCCP=excluding; @@ -12550,9 +12509,6 @@ static MagickBooleanType WritePNGImage(const ImageInfo *image_info, if (mng_info->ping_exclude_tRNS != MagickFalse) (void) LogMagickEvent(CoderEvent,GetMagickModule(), " tRNS"); - if (mng_info->ping_exclude_vpAg != MagickFalse) - (void) LogMagickEvent(CoderEvent,GetMagickModule(), - " vpAg"); if (mng_info->ping_exclude_zCCP != MagickFalse) (void) LogMagickEvent(CoderEvent,GetMagickModule(), " zCCP"); @@ -12971,17 +12927,6 @@ static MagickBooleanType WriteOneJNGImage(MngInfo *mng_info, (void) WriteBlob(image,13,chunk); (void) WriteBlobMSBULong(image,crc32(0,chunk,13)); } - if (mng_info->write_mng == 0 && (image->page.width || image->page.height)) - { - (void) WriteBlobMSBULong(image,9L); /* data length=8 */ - PNGType(chunk,mng_vpAg); - LogPNGChunk(logging,mng_vpAg,9L); - PNGLong(chunk+4,(png_uint_32) image->page.width); - PNGLong(chunk+8,(png_uint_32) image->page.height); - chunk[12]=0; /* unit = pixels */ - (void) WriteBlob(image,13,chunk); - (void) WriteBlobMSBULong(image,crc32(0,chunk,13)); - } if (transparent != 0) { @@ -14037,7 +13982,6 @@ static MagickBooleanType WriteMNGImage(const ImageInfo *image_info, mng_info->ping_exclude_sRGB=MagickTrue; mng_info->ping_exclude_tEXt=MagickTrue; mng_info->ping_exclude_tRNS=MagickTrue; - mng_info->ping_exclude_vpAg=MagickTrue; mng_info->ping_exclude_zCCP=MagickTrue; mng_info->ping_exclude_zTXt=MagickTrue;