summaryrefslogtreecommitdiffstats
path: root/b143619b68df3962b4bb542561f7448aa6d40915.patch
blob: 40e63db29dedc6516af0ebb341c4fa97f973343f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From b143619b68df3962b4bb542561f7448aa6d40915 Mon Sep 17 00:00:00 2001
From: Dirk Lemstra <dirk@lemstra.org>
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,