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(1, 8, BOOST_GIL_TEST_GENERATE_TILE_STRIP_COMPARISON_BIT_ALIGNED_MINISBLACK, minisblack)
22 BOOST_PP_REPEAT_FROM_TO(9, 11, BOOST_GIL_TEST_GENERATE_TILE_STRIP_COMPARISON_BIT_ALIGNED_MINISBLACK, minisblack)
23 
test_read_tile_and_compare_with_minisblack_strip_8()24 void test_read_tile_and_compare_with_minisblack_strip_8()
25 {
26     std::string filename_strip(tiff_in_GM + "tiger-minisblack-strip-08.tif");
27     std::string filename_tile(tiff_in_GM + "tiger-minisblack-tile-08.tif");
28 
29     gil::gray8_image_t img_strip, img_tile;
30     gil::read_image(filename_strip, img_strip, gil::tiff_tag());
31     gil::read_image(filename_tile, img_tile, gil::tiff_tag());
32 
33     BOOST_TEST(gil::equal_pixels(gil::const_view(img_strip), gil::const_view(img_tile)));
34 }
35 
main()36 int main()
37 {
38     test_read_tile_and_compare_with_minisblack_strip_8();
39 
40     // TODO: Make sure generated test cases are executed. See tiff_subimage_test.cpp. ~mloskot
41 
42     return boost::report_errors();
43 }
44 
45 #else
main()46 int main() {}
47 #endif // BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES
48