Commit c18da6bc for libheif
commit c18da6bcf0441aa7ae1bf5c55bb02f11c008b41a
Author: Dirk Farin <dirk.farin@gmail.com>
Date: Mon Aug 24 01:29:22 2026 +0200
handle extra data channels in has_standard_plane_sizes()
diff --git a/libheif/image/pixelimage.cc b/libheif/image/pixelimage.cc
index 8316bf71..8eb8dedb 100644
--- a/libheif/image/pixelimage.cc
+++ b/libheif/image/pixelimage.cc
@@ -816,6 +816,9 @@ bool HeifPixelImage::has_standard_plane_sizes() const
case heif_channel_G:
case heif_channel_B:
case heif_channel_interleaved:
+ case heif_channel_filter_array:
+ case heif_channel_depth:
+ case heif_channel_disparity:
expected_w = m_width;
expected_h = m_height;
break;
@@ -827,6 +830,10 @@ bool HeifPixelImage::has_standard_plane_sizes() const
default:
// Not one of the standard channels this check knows the geometry of.
+ // Notably heif_channel_unknown, used by the uncompressed codec for
+ // padded/unrecognized multi-component data, which has no universal
+ // size rule (and, unlike the channels above, may legitimately appear
+ // more than once per image) -- rejected rather than guessed at.
return false;
}