summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-04-22 22:24:09 +0200
committerCarl Hetherington <cth@carlh.net>2026-04-23 16:51:08 +0200
commite54f93bf7d144737df4b0331017164360c9121ff (patch)
treeac8bd65231b31c414fd87348587a6dabd97d31d2 /test
parent9f828b327e680c322a70883910233337a37e481e (diff)
Fix reading of RGB0 images.
We would allocate 3 bytes per pixel instead of 4. I couldn't see a way to get FFmpeg to tell us about this (unless we used FFmpeg's stride somehow maybe?)
Diffstat (limited to 'test')
-rw-r--r--test/image_test.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/image_test.cc b/test/image_test.cc
index 807f88d04..6d566aac7 100644
--- a/test/image_test.cc
+++ b/test/image_test.cc
@@ -759,3 +759,15 @@ BOOST_AUTO_TEST_CASE(over_crop_test)
check_image("test/data/" + filename, "build/test/" + filename);
}
+
+BOOST_AUTO_TEST_CASE(rgb0_image_test)
+{
+ auto proxy = make_shared<FFmpegImageProxy>(TestPaths::private_data() / "rgb0.tif");
+ write_image(
+ proxy->image(Image::Alignment::PADDED).image->convert_pixel_format(
+ dcp::YUVToRGB::REC709, AV_PIX_FMT_RGB24, Image::Alignment::COMPACT, false
+ ), "build/test/rgb0.png"
+ );
+ check_image(TestPaths::private_data() / "rgb0.png", "build/test/rgb0.png");
+}
+