From: Cristy Date: Wed, 8 May 2019 16:18:40 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.8-45~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82563b84c4beed3f20b723b9c2fedaa3c59bcafd;p=imagemagick ... --- diff --git a/coders/heic.c b/coders/heic.c index 0b951fa37..2556858ff 100644 --- a/coders/heic.c +++ b/coders/heic.c @@ -229,6 +229,7 @@ static Image *ReadHEICImage(const ImageInfo *image_info, heif_context_free(heif_context); return(DestroyImageList(image)); } +#if LIBHEIF_NUMERIC_VERSION >= 0x01040000 length=heif_image_handle_get_raw_color_profile_size(image_handle); if (length > 0) { @@ -264,6 +265,7 @@ static Image *ReadHEICImage(const ImageInfo *image_info, } color_buffer=(unsigned char *) RelinquishMagickMemory(color_buffer); } +#endif count=heif_image_handle_get_list_of_metadata_block_IDs(image_handle,"Exif", &exif_id,1); if (count > 0) @@ -678,8 +680,10 @@ static MagickBooleanType WriteHEICImage(const ImageInfo *image_info, const Quantum *p; +#if LIBHEIF_NUMERIC_VERSION >= 0x01040000 const StringInfo *profile; +#endif int stride_y, @@ -712,10 +716,12 @@ static MagickBooleanType WriteHEICImage(const ImageInfo *image_info, status=IsHeifSuccess(&error,image,exception); if (status == MagickFalse) break; +#if LIBHEIF_NUMERIC_VERSION >= 0x01040000 profile=GetImageProfile(image,"icc"); if (profile != (StringInfo *) NULL) (void) heif_image_set_raw_color_profile(heif_image,"prof", GetStringInfoDatum(profile),GetStringInfoLength(profile)); +#endif error=heif_image_add_plane(heif_image,heif_channel_Y,(int) image->columns, (int) image->rows,8); status=IsHeifSuccess(&error,image,exception);