2 // Copyright 2013 Christian Henning
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
8 //#define BOOST_TEST_MODULE bmp_write_test_module
9 #include <boost/gil.hpp>
10 #include <boost/gil/io/typedefs.hpp>
11 #include <boost/gil/extension/io/bmp.hpp>
13 #include <boost/test/unit_test.hpp>
15 #include "cmp_view.hpp"
16 #include "color_space_write_test.hpp"
17 #include "mandel_view.hpp"
21 using namespace boost::gil;
23 using tag_t = bmp_tag;
25 BOOST_AUTO_TEST_SUITE( gil_io_bmp_tests )
27 #ifdef BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
28 BOOST_AUTO_TEST_CASE( write_test )
31 // test writing all supported image types
33 write_view( bmp_out + "rgb8_test.bmp"
34 , create_mandel_view( 200, 200
35 , rgb8_pixel_t( 0, 0, 255 )
36 , rgb8_pixel_t( 0, 255, 0 )
43 write_view( bmp_out + "rgba8_test.bmp"
44 , create_mandel_view( 200, 200
45 , rgba8_pixel_t( 0, 0, 255, 0 )
46 , rgba8_pixel_t( 0, 255, 0, 0 )
52 #endif // BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
54 BOOST_AUTO_TEST_CASE( rgb_color_space_write_test )
56 color_space_write_test< bmp_tag >( bmp_out + "rgb_color_space_test.bmp"
57 , bmp_out + "bgr_color_space_test.bmp"
61 BOOST_AUTO_TEST_SUITE_END()