From: Dirk Lemstra Date: Sun, 20 Jan 2019 09:13:25 +0000 (+0100) Subject: Remove unused code. X-Git-Tag: 7.0.8-25~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c156c353c03a9a569c294a0ed7503086c6d6c1be;p=imagemagick Remove unused code. --- diff --git a/coders/heic.c b/coders/heic.c index 85d1a7dbd..3e0cb5759 100644 --- a/coders/heic.c +++ b/coders/heic.c @@ -94,7 +94,6 @@ static MagickBooleanType */ static const char *xmp_namespace = "http://ns.adobe.com/xap/1.0/ "; #define XmpNamespaceExtent 28 -#define ICC_PROFILE "ICC_PROFILE" /*x %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -455,73 +454,6 @@ ModuleExport void UnregisterHEICImage(void) (void) UnregisterMagickInfo("HEIC"); } -static void WriteICCProfile(struct heif_context* ctx, struct heif_image* heif_image, Image *image, ExceptionInfo *exception) -{ - const char - *name; - - const StringInfo - *profile; - - MagickBooleanType - iptc; - - register ssize_t - i; - - size_t - length, - tag_length; - - StringInfo - *custom_profile; - - struct heif_error error; - - /* - Save image profile as a APP marker. - */ - iptc=MagickFalse; - custom_profile=AcquireStringInfo(65535L); - ResetImageProfileIterator(image); - for (name=GetNextImageProfile(image); name != (const char *) NULL; ) - { - profile=GetImageProfile(image,name); - length=GetStringInfoLength(profile); - - if (LocaleCompare(name,"ICC") == 0) - { - register unsigned char - *p; - - tag_length=strlen(ICC_PROFILE); - p=GetStringInfoDatum(custom_profile); - (void) memcpy(p,ICC_PROFILE,tag_length); - p[tag_length]='\0'; - for (i=0; i < (ssize_t) GetStringInfoLength(profile); i+=65519L) - { - length=MagickMin(GetStringInfoLength(profile)-i,65519L); - p[12]=(unsigned char) ((i/65519L)+1); - p[13]=(unsigned char) (GetStringInfoLength(profile)/65519L+1); - (void) memcpy(p+tag_length+3,GetStringInfoDatum(profile)+i, - length); - error = heif_image_set_raw_color_profile(heif_image, - "prof", - (void*)GetStringInfoDatum(custom_profile), - (length+tag_length+3)); - if (error.code != 0) { - fprintf(stderr, "Could not write icc profile: %s\n", error.message); - } - } - } - - (void) LogMagickEvent(CoderEvent,GetMagickModule(), - "%s profile: %.20g bytes",name,(double) GetStringInfoLength(profile)); - name=GetNextImageProfile(image); - } - custom_profile=DestroyStringInfo(custom_profile); -} - static void WriteProfile(struct heif_context* ctx, Image *image, ExceptionInfo *exception) { const char