Actual behavior
Channel conversion from boost::gil::packed_channel_value to uint16_t fails due to integer overflow in channel_converter_unsigned_integral_nondivisible<SrcChannelV,DstChannelV,true,false> .
Expected behavior
The value should not overflow, producing correct results.
C++ Minimal Working Example
#include <boost/gil.hpp>
namespace gil = boost::gil;
int main
{
boost::gil::packed_channel_value<10> packedChannelValue(3);
//Expected 192, got 64
uint16_t convertedValue = boost::gil::channel_convert<uint16_t>(packedChannelValue);
}
Environment
- Compiler version: GCC 8.4.0
- Build settings:
- Version (Git ref or
<boost/version.hpp>): 1.68 but seems to still be present in latest version.
Actual behavior
Channel conversion from boost::gil::packed_channel_value to uint16_t fails due to integer overflow in channel_converter_unsigned_integral_nondivisible<SrcChannelV,DstChannelV,true,false> .
Expected behavior
The value should not overflow, producing correct results.
C++ Minimal Working Example
Environment
<boost/version.hpp>): 1.68 but seems to still be present in latest version.