blob: b85bcddef259b271138a1b21ec37412b1d94f9fb (
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
27
28
29
|
From b506f7716c8e43e13707a394cc088e4d9d4c4098 Mon Sep 17 00:00:00 2001
From: Dirk Lemstra <dirk@lemstra.org>
Date: Fri, 16 Oct 2020 11:05:28 +0200
Subject: [PATCH] Added version check for
heif_image_handle_get_luma_bits_per_pixel.
---
coders/heic.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/coders/heic.c b/coders/heic.c
index d8ca048e8..3ba368b15 100644
--- a/coders/heic.c
+++ b/coders/heic.c
@@ -303,10 +303,13 @@ static Image *ReadHEICImage(const ImageInfo *image_info,
/*
Set image size.
*/
- image->depth=8;
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
preserve_orientation=IsStringTrue(GetImageOption(image_info,
"heic:preserve-orientation"));
if (preserve_orientation == MagickFalse)
|