From 1b79dcd526e97502a5deb9ce96b8cec6580fdb80 Mon Sep 17 00:00:00 2001 From: Cristy Date: Wed, 3 Aug 2016 17:46:41 -0400 Subject: [PATCH] Don't include the ImageMagick version number in any image file metadata --- MagickCore/resize.c | 5 +---- MagickCore/version.c | 2 +- coders/dpx.c | 4 ++-- coders/fits.c | 2 +- coders/json.c | 3 +-- coders/pdf.c | 6 +++--- coders/wmf.c | 6 +++--- 7 files changed, 12 insertions(+), 16 deletions(-) diff --git a/MagickCore/resize.c b/MagickCore/resize.c index 53e7e4620..ca95ae5d4 100644 --- a/MagickCore/resize.c +++ b/MagickCore/resize.c @@ -3642,9 +3642,6 @@ MagickExport Image *ThumbnailImage(const Image *image,const size_t columns, x_factor, y_factor; - size_t - version; - struct stat attributes; @@ -3715,7 +3712,7 @@ MagickExport Image *ThumbnailImage(const Image *image,const size_t columns, (void) FormatLocaleString(value,MagickPathExtent,"image/%s",image->magick); LocaleLower(value); (void) SetImageProperty(thumbnail_image,"Thumb::Mimetype",value,exception); - (void) SetImageProperty(thumbnail_image,"software",GetMagickVersion(&version), + (void) SetImageProperty(thumbnail_image,"software",GetMagickHomeURL(), exception); (void) FormatLocaleString(value,MagickPathExtent,"%.20g",(double) image->magick_columns); diff --git a/MagickCore/version.c b/MagickCore/version.c index 112d8063e..7127a82ce 100644 --- a/MagickCore/version.c +++ b/MagickCore/version.c @@ -587,7 +587,7 @@ MagickExport const char *GetMagickVersion(size_t *version) MagickExport void ListMagickVersion(FILE *file) { (void) FormatLocaleFile(file,"Version: %s\n", - GetMagickVersion((size_t *) NULL)); + GetMagickVersion((size_t *) NULL));; (void) FormatLocaleFile(file,"Copyright: %s\n",GetMagickCopyright()); (void) FormatLocaleFile(file,"License: %s\n",GetMagickLicense()); #if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_MSC_FULL_VER) diff --git a/coders/dpx.c b/coders/dpx.c index 2fbfbe222..66d8eefda 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -1566,8 +1566,8 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image, dpx.file.timestamp); offset+=WriteBlob(image,sizeof(dpx.file.timestamp),(unsigned char *) dpx.file.timestamp); - (void) strncpy(dpx.file.creator,GetMagickVersion((size_t *) NULL), - sizeof(dpx.file.creator)-1); + (void) strncpy(dpx.file.creator,GetMagickHomeURL(),sizeof(dpx.file.creator)- + 1); value=GetDPXProperty(image,"dpx:file.creator",exception); if (value != (const char *) NULL) (void) strncpy(dpx.file.creator,value,sizeof(dpx.file.creator)-1); diff --git a/coders/fits.c b/coders/fits.c index a20ec3f25..17c8704eb 100644 --- a/coders/fits.c +++ b/coders/fits.c @@ -713,7 +713,7 @@ static MagickBooleanType WriteFITSImage(const ImageInfo *image_info, offset+=80; } (void) FormatLocaleString(header,FITSBlocksize,"HISTORY %.72s", - GetMagickVersion((size_t *) NULL)); + GetMagickHomeURL()); (void) strncpy(fits_info+offset,header,strlen(header)); offset+=80; (void) strncpy(header,"END",FITSBlocksize); diff --git a/coders/json.c b/coders/json.c index 727e7ed22..c6d335a0f 100644 --- a/coders/json.c +++ b/coders/json.c @@ -1552,8 +1552,7 @@ static MagickBooleanType EncodeImageAttributes(Image *image,FILE *file, (unsigned long) (elapsed_time/60.0),(unsigned long) ceil(fmod( elapsed_time,60.0)),(unsigned long) (1000.0*(elapsed_time-floor( elapsed_time)))); - JsonFormatLocaleFile(file," \"version\": %s\n", - GetMagickVersion((size_t *) NULL)); + JsonFormatLocaleFile(file," \"version\": %s\n",GetMagickHomeURL()); (void) FormatLocaleFile(file," }\n}\n"); (void) fflush(file); return(ferror(file) != 0 ? MagickFalse : MagickTrue); diff --git a/coders/pdf.c b/coders/pdf.c index ae1ac0b17..696588c84 100644 --- a/coders/pdf.c +++ b/coders/pdf.c @@ -1382,8 +1382,8 @@ RestoreMSCWarning (void) FormatMagickTime(time((time_t *) NULL),MagickPathExtent,timestamp); i=FormatLocaleString(xmp_profile,MagickPathExtent,XMPProfile, XMPProfileMagick,modify_date,create_date,timestamp, - GetMagickVersion(&version),EscapeParenthesis(basename), - GetMagickVersion(&version)); + GetMagickHomeURL(),EscapeParenthesis(basename), + GetMagickHomeURL()); (void) FormatLocaleString(buffer,MagickPathExtent,"/Length %.20g\n", (double) i); (void) WriteBlobString(image,buffer); @@ -2837,7 +2837,7 @@ RestoreMSCWarning (void) FormatLocaleString(buffer,MagickPathExtent,"/ModDate (%s)\n",date); (void) WriteBlobString(image,buffer); (void) FormatLocaleString(buffer,MagickPathExtent,"/Producer (%s)\n", - EscapeParenthesis(GetMagickVersion((size_t *) NULL))); + EscapeParenthesis(GetMagickHomeURL())); (void) WriteBlobString(image,buffer); (void) WriteBlobString(image,">>\n"); (void) WriteBlobString(image,"endobj\n"); diff --git a/coders/wmf.c b/coders/wmf.c index 77ce331ef..4524bec19 100644 --- a/coders/wmf.c +++ b/coders/wmf.c @@ -835,10 +835,10 @@ static void ipa_device_begin(wmfAPI * API) /* Make SVG output happy */ (void) PushDrawingWand(WmfDrawingWand); - DrawSetViewbox(WmfDrawingWand, 0, 0, ddata->image->columns, ddata->image->rows ); + DrawSetViewbox(WmfDrawingWand,0,0,ddata->image->columns,ddata->image->rows); - (void) FormatLocaleString(comment,MagickPathExtent,"Created by ImageMagick %s", - GetMagickVersion((size_t *) NULL)); + (void) FormatLocaleString(comment,MagickPathExtent, + "Created by ImageMagick %s",GetMagickHomeURL()); DrawComment(WmfDrawingWand,comment); /* Scale width and height to image */ -- 2.40.0