mirror of
https://github.com/boostorg/gil.git
synced 2026-01-26 18:42:12 +00:00
Correct calculation to correctly map CMYK 0 to minimum and 1 to maximum of input and output channel types. If float-point division is necessary, use double instead of float which may be too narrow for large operands. cmyk32_pixel_t is based on uint32_t which multiplication by its maximum may yield result too large to fit 32-bit float. For example, (uint32_t(c) - uint32_t(k)) * float(s) for c = 4294967295, k = 0, s = 1.0 results in 4294967300 value which does not fit uint32_t. Fixes #406, but does not fix #479
22 lines
569 B
Plaintext
22 lines
569 B
Plaintext
# Boost.GIL (Generic Image Library) - tests
|
|
#
|
|
# Copyright (c) 2019 Mateusz Loskot <mateusz@loskot.net>
|
|
#
|
|
# Distributed under the Boost Software License, Version 1.0.
|
|
# (See accompanying file LICENSE_1_0.txt or
|
|
# copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
import testing ;
|
|
|
|
compile bit_aligned_pixel_reference.cpp ;
|
|
compile concepts.cpp ;
|
|
compile is_pixel.cpp ;
|
|
compile is_planar.cpp ;
|
|
compile num_channels.cpp ;
|
|
compile pixel_reference_is_mutable.cpp ;
|
|
compile pixels_are_compatible.cpp ;
|
|
|
|
run color_convert_cmyk.cpp ;
|
|
run packed_pixel.cpp ;
|
|
run test_fixture.cpp ;
|