Log in

View Full Version : ShowRed, ShowGreen, ShowBlue all seem to return "grey levels"


rookandpawn
30th April 2009, 12:01
I was expecting to see ShowRed to reveal "the red parts" of my image... But instead it seems to just return greyscale images. Anyone know how I can "get the red layer"?

Archimedes
30th April 2009, 13:23
What you see is the specified channel.

In v2.56 ShowAlpha/Red/Green/Blue now returns RGB24, RGB32, YUY2, or YV12 via the pixel_type argument. For RGB32 output the selected channel is copied to all R, G and B channels, but not the Alpha channel which is left untouched. For YUV output the selected channel is copied to the Luma channel, the chroma channels are set to grey (0x80).
If you want a colored image, you have to tweak the other channels.

ShowRed()
RGBAdjust(rb=0, gb=-255, bb=-255)

http://img151.imageshack.us/img151/9301/200810251604215660400x0.jpg (http://img151.imageshack.us/my.php?image=200810251604215660400x0.jpg)

ShowGreen()
RGBAdjust(rb=-255, gb=0, bb=-255)

http://img152.imageshack.us/img152/9301/200810251604215660400x0.jpg (http://img152.imageshack.us/my.php?image=200810251604215660400x0.jpg)

ShowBlue()
RGBAdjust(rb=-255, gb=-255, bb=0)

http://img151.imageshack.us/img151/7645/200810251604215660400x0a.jpg (http://img151.imageshack.us/my.php?image=200810251604215660400x0a.jpg)