tiff_tiled_minisblack_test_21-31_32-64.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #include <cstdint>
  11. #include "tiff_tiled_read_macros.hpp"
  12. BOOST_AUTO_TEST_SUITE( gil_io_tiff_tests )
  13. #ifdef BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES
  14. BOOST_PP_REPEAT_FROM_TO(21, 32, GENERATE_TILE_STRIP_COMPARISON_BIT_ALIGNED_MINISBLACK, minisblack )
  15. BOOST_AUTO_TEST_CASE( read_tile_and_compare_with_minisblack_strip_32 )
  16. {
  17. using namespace std;
  18. using namespace boost;
  19. using namespace gil;
  20. string filename_strip( tiff_in_GM + "tiger-minisblack-strip-32.tif" );
  21. string filename_tile ( tiff_in_GM + "tiger-minisblack-tile-32.tif" );
  22. using gray32_pixel_t = pixel<unsigned int, gray_layout_t>;
  23. image< gray32_pixel_t, false > img_strip, img_tile;
  24. read_image( filename_strip, img_strip, tag_t() );
  25. read_image( filename_tile, img_tile, tag_t() );
  26. BOOST_CHECK_EQUAL( equal_pixels( const_view(img_strip), const_view(img_tile) ), true);
  27. }
  28. BOOST_AUTO_TEST_CASE( read_tile_and_compare_with_minisblack_strip_64 )
  29. {
  30. using namespace std;
  31. using namespace boost;
  32. using namespace gil;
  33. string filename_strip( tiff_in_GM + "tiger-minisblack-strip-64.tif" );
  34. string filename_tile ( tiff_in_GM + "tiger-minisblack-tile-64.tif" );
  35. using gray64_pixel_t = pixel<uint64_t, gray_layout_t>;
  36. image< gray64_pixel_t, false > img_strip, img_tile;
  37. read_image( filename_strip, img_strip, tag_t() );
  38. read_image( filename_tile, img_tile, tag_t() );
  39. BOOST_CHECK_EQUAL( equal_pixels( const_view(img_strip), const_view(img_tile) ), true);
  40. }
  41. #endif // BOOST_GIL_IO_USE_TIFF_GRAPHICSMAGICK_TEST_SUITE_IMAGES
  42. BOOST_AUTO_TEST_SUITE_END()