/****************************************************************************** * __LICENCE_BEGIN__ * * __LICENCE_END__ *****************************************************************************/ ///@file ///@brief Test that RGBA images are detected by the TIFF reader. /// ///@author john.femiani@asu.edu /// /// #include #include #include namespace gil = boost::gil; BOOST_AUTO_TEST_CASE(test_tiff_read_rgba8_image){ gil::rgba8_image_t rgb; ::boost::gil::tiff_read_image("images/rgba.tif", rgb); BOOST_CHECK_MESSAGE(rgb.width() == 86, "rgb.width() == 86 failed: Was " << rgb.width()); BOOST_CHECK_MESSAGE(rgb.height() == 64, "rgb.height() == 64 failed: Was " << rgb.width()); for (int y = 0; y < rgb.height(); ++y){ for (int x = 0; x < rgb.width(); ++x){ gil::rgba8_pixel_t pix = view(rgb)(x,y); BOOST_REQUIRE_MESSAGE(pix == gil::rgba8_pixel_t(128,128,128,255), "pix!=128,128,128,255 found pix=" << (int)pix[0] << "," << (int)pix[1] << "," << (int)pix[2] << "," << (int)pix[3] << " at x="<