]> git.imager.perl.org - imager.git/commitdiff
describe the color model
authorTony Cook <tony@develop=help.com>
Tue, 4 Dec 2007 03:46:42 +0000 (03:46 +0000)
committerTony Cook <tony@develop=help.com>
Tue, 4 Dec 2007 03:46:42 +0000 (03:46 +0000)
lib/Imager/Color.pm
lib/Imager/Color/Float.pm

index c770b798aadd90266b333ac0c616633253013047..55ac2e2a8ba3290380013ddba9fbf0ea3b912d7f 100644 (file)
@@ -397,6 +397,29 @@ This module handles creating color objects used by imager.  The idea is
 that in the future this module will be able to handle colorspace calculations
 as well.
 
+An Imager color consists of up to four components, each in the range 0
+to 255. Unfortunately the meaning of the components can change
+depending on the type of image you're dealing with:
+
+=over
+
+=item *
+
+for 3 or 4 channel images the color components are red, green, blue,
+alpha.
+
+=item *
+
+for 1 or 2 channel images the color components are gray, alpha, with
+the other two components ignored.
+
+=back
+
+An alpha value of zero is fully transparent, an alpha value of 255 is
+fully opaque.
+
+=item METHODS
+
 =over 4
 
 =item new
@@ -572,7 +595,7 @@ list.
 
 =head1 SEE ALSO
 
-Imager(3)
+Imager(3), Imager::Color
 http://imager.perl.org/
 
 =cut
index 7a57e207bc8b97273226de2125ede980006ee7e9..f13c98bedfbbf1fbd087aa03f9e73da7996a2c96 100644 (file)
@@ -66,6 +66,29 @@ This module handles creating color objects used by imager.  The idea is
 that in the future this module will be able to handle colorspace calculations
 as well.
 
+A floating point Imager color consists of up to four components, each
+in the range 0.0 to 1.0. Unfortunately the meaning of the components
+can change depending on the type of image you're dealing with:
+
+=over
+
+=item *
+
+for 3 or 4 channel images the color components are red, green, blue,
+alpha.
+
+=item *
+
+for 1 or 2 channel images the color components are gray, alpha, with
+the other two components ignored.
+
+=back
+
+An alpha value of zero is fully transparent, an alpha value of 1.0 is
+fully opaque.
+
+=head1 METHODS
+
 =over 4
 
 =item new
@@ -95,7 +118,7 @@ list.
 
 =head1 SEE ALSO
 
-Imager(3)
+Imager(3), Imager::Color.
 
 http://imager.perl.org/