Commit 3bc38092 for libheif
commit 3bc38092dc7fbc5128cd7763140de332bb11450b
Author: Dirk Farin <dirk.farin@gmail.com>
Date: Fri May 15 01:20:58 2026 +0200
Return an error for unsupported bit depth in rotate_ccw
diff --git a/libheif/image/pixelimage.cc b/libheif/image/pixelimage.cc
index 4d6da98b..f617ffce 100644
--- a/libheif/image/pixelimage.cc
+++ b/libheif/image/pixelimage.cc
@@ -1275,6 +1275,13 @@ Result<std::shared_ptr<HeifPixelImage>> HeifPixelImage::rotate_ccw(int angle_deg
else if (component.m_bit_depth <= 128) {
component.rotate_ccw<heif_complex64>(angle_degrees, out_component);
}
+ else {
+ std::stringstream sstr;
+ sstr << "Cannot rotate images with " << component.m_bit_depth << " bits per pixel";
+ return Error{heif_error_Unsupported_feature,
+ heif_suberror_Unspecified,
+ sstr.str()};
+ }
out_img->m_storage.push_back(std::move(out_component));
}