Skip to content

Commit d2fcee6

Browse files
authored
Merge pull request #454 from apocelipes/fix-libheif
Fix the compatible with the new interface of libheif 1.20+
2 parents 9004db0 + 1201058 commit d2fcee6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

CImg.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59502,7 +59502,11 @@ namespace cimg_library {
5950259502
S = handle.has_alpha_channel()?4:3;
5950359503
assign(W,H,1,S);
5950459504

59505-
int stride;
59505+
#if LIBHEIF_NUMERIC_VERSION < LIBHEIF_MAKE_VERSION(1, 20, 0)
59506+
int stride = 0;
59507+
#else
59508+
size_t stride = 0;
59509+
#endif
5950659510
const unsigned char *const buffer = image.get_plane(heif_channel_interleaved,&stride);
5950759511
T *ptr_r = _data, *ptr_g = data(0,0,0,1), *ptr_b = data(0,0,0,2), *ptr_a = S>3?data(0,0,0,3):0;
5950859512
cimg_forY(*this,y) {

0 commit comments

Comments
 (0)