]>
Commit | Line | Data |
---|---|---|
92f5a8d4 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 | //#define BOOST_TEST_MODULE tiff_tiled_miniblack_test_21_31_32_64_module | |
9 | #include <boost/test/unit_test.hpp> | |
10 | ||
11 | #include <cstdint> | |
12 | #include "tiff_tiled_read_macros.hpp" | |
13 | ||
14 | BOOST_AUTO_TEST_SUITE( gil_io_tiff_tests ) | |
15 | ||
16 | #ifdef BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES | |
17 | ||
18 | BOOST_PP_REPEAT_FROM_TO(21, 32, GENERATE_TILE_STRIP_COMPARISON_BIT_ALIGNED_MINISBLACK, minisblack ) | |
19 | ||
20 | BOOST_AUTO_TEST_CASE( read_tile_and_compare_with_minisblack_strip_32 ) | |
21 | { | |
22 | using namespace std; | |
23 | using namespace boost; | |
24 | using namespace gil; | |
25 | ||
26 | string filename_strip( tiff_in_GM + "tiger-minisblack-strip-32.tif" ); | |
27 | string filename_tile ( tiff_in_GM + "tiger-minisblack-tile-32.tif" ); | |
28 | ||
29 | using gray32_pixel_t = pixel<unsigned int, gray_layout_t>; | |
30 | image< gray32_pixel_t, false > img_strip, img_tile; | |
31 | ||
32 | read_image( filename_strip, img_strip, tag_t() ); | |
33 | read_image( filename_tile, img_tile, tag_t() ); | |
34 | ||
35 | BOOST_CHECK_EQUAL( equal_pixels( const_view(img_strip), const_view(img_tile) ), true); | |
36 | } | |
37 | ||
38 | BOOST_AUTO_TEST_CASE( read_tile_and_compare_with_minisblack_strip_64 ) | |
39 | { | |
40 | using namespace std; | |
41 | using namespace boost; | |
42 | using namespace gil; | |
43 | ||
44 | string filename_strip( tiff_in_GM + "tiger-minisblack-strip-64.tif" ); | |
45 | string filename_tile ( tiff_in_GM + "tiger-minisblack-tile-64.tif" ); | |
46 | ||
47 | using gray64_pixel_t = pixel<uint64_t, gray_layout_t>; | |
48 | image< gray64_pixel_t, false > img_strip, img_tile; | |
49 | ||
50 | read_image( filename_strip, img_strip, tag_t() ); | |
51 | read_image( filename_tile, img_tile, tag_t() ); | |
52 | ||
53 | BOOST_CHECK_EQUAL( equal_pixels( const_view(img_strip), const_view(img_tile) ), true); | |
54 | } | |
55 | ||
56 | #endif // BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES | |
57 | ||
58 | BOOST_AUTO_TEST_SUITE_END() |