diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-03-19 21:53:20 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-03-19 21:53:20 +0100 |
| commit | 8fb9468aff13b6840fb02a8a899e314b79395f5d (patch) | |
| tree | ffb1fce61851c80c1345580645e33feec1e3ae05 /test | |
| parent | 4ddd6052b00a07583fda682730dde3c3d1206d1b (diff) | |
Fix auto-crop with DCPs (#2999).
Diffstat (limited to 'test')
| -rw-r--r-- | test/guess_crop_test.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/guess_crop_test.cc b/test/guess_crop_test.cc index b62042d1a..9ce089a80 100644 --- a/test/guess_crop_test.cc +++ b/test/guess_crop_test.cc @@ -21,14 +21,15 @@ #include "lib/content.h" #include "lib/content_factory.h" +#include "lib/dcp_content.h" #include "lib/guess_crop.h" #include "lib/video_content.h" #include "test.h" #include <boost/test/unit_test.hpp> -#include <iostream> #include <vector> +using std::make_shared; using namespace dcpomatic; @@ -57,3 +58,13 @@ BOOST_AUTO_TEST_CASE (guess_crop_image_test3) BOOST_CHECK(guess_crop_by_brightness(film, content[0], 0.1, {}) == Crop(113, 262, 0, 0)); } + + +BOOST_AUTO_TEST_CASE(guess_crop_image_dcp_test) +{ + auto content = make_shared<DCPContent>("test/data/scaling_test_133_185"); + auto film = new_test_film("guess_crop_image_dcp_test", { content }); + + BOOST_CHECK(guess_crop_by_brightness(film, content, 0.1, {}) == Crop(279, 279, 0, 0)); +} + |
