]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <mikayla-grace@urban-warrior.org>
Wed, 8 May 2019 16:18:40 +0000 (12:18 -0400)
committerCristy <mikayla-grace@urban-warrior.org>
Wed, 8 May 2019 16:18:40 +0000 (12:18 -0400)
coders/heic.c

index 0b951fa3752a55363cba79d4885e7f97dce82bb2..2556858ff2b54780ae2533ccf8888c5370b9d99d 100644 (file)
@@ -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);