From b143619b68df3962b4bb542561f7448aa6d40915 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Fri, 16 Oct 2020 11:05:01 +0200 Subject: [PATCH] Added version check for heif_image_handle_get_luma_bits_per_pixel (#2729). --- coders/heic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/coders/heic.c b/coders/heic.c index ce7742cac0..cc38a4ffc2 100644 --- a/coders/heic.c +++ b/coders/heic.c @@ -305,7 +305,11 @@ static MagickBooleanType ReadHEICImageByID(const ImageInfo *image_info, */ image->columns=(size_t) heif_image_handle_get_width(image_handle); image->rows=(size_t) heif_image_handle_get_height(image_handle); +#if LIBHEIF_NUMERIC_VERSION > 0x01040000 image->depth=(size_t) heif_image_handle_get_luma_bits_per_pixel(image_handle); +#else + image->depth=8; +#endif if (heif_image_handle_has_alpha_channel(image_handle)) image->alpha_trait=BlendPixelTrait; preserve_orientation=IsStringTrue(GetImageOption(image_info,