Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / gil / test / core / image_processing / threshold_color_spaces_not_compatible_fail.cpp
1 //
2 // Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
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 #include <boost/gil/image_processing/threshold.hpp>
9
10 namespace gil = boost::gil;
11
12 int main()
13 {
14     // Source and destination views must have pixels with the same (compatible) color space
15     {
16         gil::rgb8_image_t src;
17         gil::gray8_image_t dst;
18         gil::threshold_binary(const_view(src), view(dst), 0, 255);
19     }
20     {
21         gil::gray8_image_t src;
22         gil::rgb8_image_t dst;
23         gil::threshold_binary(const_view(src), view(dst), 0, 255);
24     }
25 }