summaryrefslogtreecommitdiff
path: root/test/test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-12-13 21:22:30 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-17 20:13:22 +0100
commit7701297decde2568e11feddede28177077e164cc (patch)
tree7e8b954131ec7b0acea562d00161e4b32e831a3f /test/test.cc
parent5382d3e0e587b1882ea39be146bbd9dd5700c3bb (diff)
Extent black_image() to make images of any size.
Diffstat (limited to 'test/test.cc')
-rw-r--r--test/test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test.cc b/test/test.cc
index af005e50..8092df4f 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -448,10 +448,10 @@ make_simple_with_smpte_ccaps (boost::filesystem::path path)
shared_ptr<dcp::OpenJPEGImage>
-black_image ()
+black_image (dcp::Size size)
{
- shared_ptr<dcp::OpenJPEGImage> image(new dcp::OpenJPEGImage(dcp::Size(1998, 1080)));
- int const pixels = 1998 * 1080;
+ shared_ptr<dcp::OpenJPEGImage> image(new dcp::OpenJPEGImage(size));
+ int const pixels = size.width * size.height;
for (int i = 0; i < 3; ++i) {
memset (image->data(i), 0, pixels * sizeof(int));
}