]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/gil/test/extension/io/tiff_tiled_rgb_planar_test_21-31_32_64.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / gil / test / extension / io / tiff_tiled_rgb_planar_test_21-31_32_64.cpp
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_rgb_planar_test_21_31_32_64_module
9 #include <boost/test/unit_test.hpp>
10
11 #include "tiff_tiled_read_macros.hpp"
12
13 BOOST_AUTO_TEST_SUITE( gil_io_tiff_tests )
14
15 #ifdef BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES
16
17 BOOST_PP_REPEAT_FROM_TO(21, 32, GENERATE_TILE_STRIP_COMPARISON_BIT_ALIGNED_RGB, (rgb,planar) )
18
19 BOOST_AUTO_TEST_CASE( read_tile_and_compare_with_rgb_planar_strip_32 )
20 {
21 using namespace std;
22 using namespace boost;
23 using namespace gil;
24
25 string filename_strip( tiff_in_GM + "tiger-rgb-strip-planar-32.tif" );
26 string filename_tile ( tiff_in_GM + "tiger-rgb-tile-planar-32.tif" );
27
28 using rgb32_pixel_t = pixel<unsigned int, rgb_layout_t>;
29 image< rgb32_pixel_t, false > img_strip, img_tile;
30
31 read_image( filename_strip, img_strip, tag_t() );
32 read_image( filename_tile, img_tile, tag_t() );
33
34 BOOST_CHECK_EQUAL( equal_pixels( const_view(img_strip), const_view(img_tile) ), true);
35 }
36
37 BOOST_AUTO_TEST_CASE( read_tile_and_compare_with_rgb_planar_strip_64 )
38 {
39 using namespace std;
40 using namespace boost;
41 using namespace gil;
42
43 string filename_strip( tiff_in_GM + "tiger-rgb-strip-planar-64.tif" );
44 string filename_tile ( tiff_in_GM + "tiger-rgb-tile-planar-64.tif" );
45
46 using rgb64_pixel_t = pixel<uint64_t, rgb_layout_t>;
47 image< rgb64_pixel_t, false > img_strip, img_tile;
48
49 read_image( filename_strip, img_strip, tag_t() );
50 read_image( filename_tile, img_tile, tag_t() );
51
52 BOOST_CHECK_EQUAL( equal_pixels( const_view(img_strip), const_view(img_tile) ), true);
53 }
54
55 #endif // BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES
56
57 BOOST_AUTO_TEST_SUITE_END()