]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | // |
2 | // Copyright 2013 Christian Henning | |
3 | // | |
4 | // Distributed under the Boost Software License, Version 1.0 | |
5 | // See accompanying file LICENSE_1_0.txt or copy at | |
6 | // http://www.boost.org/LICENSE_1_0.txt | |
7 | // | |
8 | #include <boost/gil.hpp> | |
9 | #include <boost/gil/extension/io/tiff.hpp> | |
10 | ||
11 | #include <boost/core/lightweight_test.hpp> | |
12 | ||
13 | #include <string> | |
14 | ||
15 | #include "tiff_tiled_read_macros.hpp" | |
16 | ||
17 | namespace gil = boost::gil; | |
18 | ||
19 | #ifdef BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES | |
20 | ||
21 | BOOST_PP_REPEAT_FROM_TO(11, 16, BOOST_GIL_TEST_GENERATE_TILE_STRIP_COMPARISON_BIT_ALIGNED_MINISBLACK, minisblack ) | |
22 | BOOST_PP_REPEAT_FROM_TO(17, 21, BOOST_GIL_TEST_GENERATE_TILE_STRIP_COMPARISON_BIT_ALIGNED_MINISBLACK, minisblack ) | |
23 | ||
24 | void test_read_tile_and_compare_with_minisblack_strip_16() | |
25 | { | |
26 | std::string filename_strip(tiff_in_GM + "tiger-minisblack-strip-16.tif"); | |
27 | std::string filename_tile(tiff_in_GM + "tiger-minisblack-tile-16.tif"); | |
28 | ||
29 | gil::gray16_image_t img_strip, img_tile; | |
30 | ||
31 | gil::read_image(filename_strip, img_strip, gil::tiff_tag()); | |
32 | gil::read_image(filename_tile, img_tile, gil::tiff_tag()); | |
33 | ||
34 | BOOST_TEST(gil::equal_pixels(gil::const_view(img_strip), gil::const_view(img_tile))); | |
35 | } | |
36 | ||
37 | int main() | |
38 | { | |
39 | test_read_tile_and_compare_with_minisblack_strip_16(); | |
40 | ||
41 | // TODO: Make sure generated test cases are executed. See tiff_subimage_test.cpp. ~mloskot | |
42 | ||
43 | return boost::report_errors(); | |
44 | } | |
45 | ||
46 | #else | |
47 | int main() {} | |
48 | #endif // BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES |