You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I load a .png picture and convert it to YCbCr, The "RGBtoYCbCr(): Instance is not a RGB image." excepion is throwed. I find out the problem is that the png file has an alpha channel and the _spectrum is 4, but RGBtoYCbCr requires the value of _spectrum is 3. So, what should I do? So sorry about my poor English.
The text was updated successfully, but these errors were encountered:
You can apply the RGB to YCbCr transform only on the three first channels, by using a shared image :
CImg<> rgba("file_rgba.png");
CImg<> rgb = rgba.get_shared_channels(0,2);
rgb.RGBtoYCbCr(); // Here, image 'rgba' is modified since 'rgb' is a shared image.
When I load a .png picture and convert it to YCbCr, The "RGBtoYCbCr(): Instance is not a RGB image." excepion is throwed. I find out the problem is that the png file has an alpha channel and the _spectrum is 4, but RGBtoYCbCr requires the value of _spectrum is 3. So, what should I do? So sorry about my poor English.
The text was updated successfully, but these errors were encountered: