views:

50

answers:

2

Hi,

Does anyone know why is Magic++ giving me RGB values less than 1? Thanks in advance.

+2  A: 

I don't know that specific library but RGBs are commonly represented as floating point values between 0 and 1 as well as unsigned byte values between 0 and 255.

bshields
+3  A: 

The maximum RGB component value in Magick is 1 and the minimum is 0. So the values should be between 0 and 1. For example, RGB values of (0.5, 0.5, 0.5) represents a grey, (1.0, 0, 0) would be a pure red, etc.

Check out the documentation. You may also find this of interest, it discusses what typically happens when the RGB component values are between 0 and 1 (multiplied by 255).

Lyndsey Ferguson