$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] [GIL] Why doesn't pixel assignment color-convert?
From: Stonewall Ballard (sb.list_at_[hidden])
Date: 2016-02-16 11:42:06
I've just started using boost.gil, though I've been looking at it for a 
while.
It seems odd to me that assignment doesn't do an implicit 
color_convert() when the pixels are of different types. Instead, it just 
copies matching channels.
That's the wrong thing to do when assigning an rgba pixel to an rgb 
pixel, since the former is straight and the latter is premultiplied.
It also seems wrong that you can assign an rgba pixel to an rgb pixel, 
but not vice-versa. It looks like this is caused by 
pixels_are_compatible in gil_concept.hpp, where it fails to check that 
both pixels have the same number of channels. Instead, it matches 
channels of the output pixel against the input pixel, ignoring any extra 
input pixel channels. It also ignores scoped_channel_value usage.
This seems like an error waiting to happen.
Comments?
  - Stoney