diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-01-15 16:21:41 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-01-15 16:21:41 +0000 |
| commit | 86214f4619476b1a4951e15f002a93743b5f7a1e (patch) | |
| tree | a827550b72a7409d280d21fc6e0a820c9f940fc2 /test/test.cc | |
| parent | a890bedf688f0066d70dd5e9b07cbd86736cc0b1 (diff) | |
Basics of subtitle rendering.
Diffstat (limited to 'test/test.cc')
| -rw-r--r-- | test/test.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/test.cc b/test/test.cc index 22dea1fc4..e76c98d8b 100644 --- a/test/test.cc +++ b/test/test.cc @@ -19,6 +19,7 @@ #include <vector> #include <list> +#include <Magick++.h> #include <libxml++/libxml++.h> #include <libdcp/dcp.h> #include "lib/config.h" @@ -29,6 +30,7 @@ #include "lib/job.h" #include "lib/cross.h" #include "lib/server_finder.h" +#include "lib/image.h" #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE dcpomatic_test #include <boost/test/unit_test.hpp> @@ -94,7 +96,7 @@ new_test_film (string name) return f; } -static void +void check_file (string ref, string check) { uintmax_t N = boost::filesystem::file_size (ref); @@ -230,3 +232,12 @@ wait_for_jobs () ui_signaller->ui_idle (); } + +void +write_image (shared_ptr<const Image> image, boost::filesystem::path file) +{ + using namespace MagickCore; + + Magick::Image m (image->size().width, image->size().height, "ARGB", CharPixel, (void *) image->data()[0]); + m.write (file.string ()); +} |
