]> git.imager.perl.org - imager.git/commitdiff
- give the colorcount() and maxcolors() methods their own entries and
authorTony Cook <tony@develop=help.com>
Thu, 2 Jun 2005 13:26:58 +0000 (13:26 +0000)
committerTony Cook <tony@develop=help.com>
Thu, 2 Jun 2005 13:26:58 +0000 (13:26 +0000)
  add them to the method index.

Changes
Imager.pm
lib/Imager/ImageTypes.pod

diff --git a/Changes b/Changes
index f66be2f8d9fb38216a2eac9ae9409a3ed272f7f3..e5d3f6bc5850ae7b2e121ca0fec6496ac57e6d5f 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1113,6 +1113,10 @@ Revision history for Perl extension Imager.
 0.45 Mon 30 May 2005
 - t/t105gif.t wasn't handling buggy giflibs correctly
 
+0.45_01
+- give the colorcount() and maxcolors() methods their own entries and
+  add them to the method index.
+
 =================================================================
 
         For latest versions check the Imager-devel pages:
index 8cc3fe682242119d8b6a981e1c0f25b8e681cf25..fd4280e678080c323deeca610d9f343090887cd1 100644 (file)
--- a/Imager.pm
+++ b/Imager.pm
@@ -2925,6 +2925,8 @@ box() - L<Imager::Draw/box>
 
 circle() - L<Imager::Draw/circle>
 
+colorcount() - L<Imager::Draw/colorcount>
+
 convert() - L<Imager::Transformations/"Color transformations"> -
 transform the color space
 
@@ -2971,6 +2973,8 @@ masked() -  L<Imager::ImageTypes> - make a masked image
 
 matrix_transform() - L<Imager::Engines/"Matrix Transformations">
 
+maxcolors() - L<Imager::ImageTypes/maxcolor>
+
 new() - L<Imager::ImageTypes>
 
 open() - L<Imager::Files> - an alias for read()
index d24333fcd3a81e4d1c8666e8134d245a55cf4450..b86c6bccc082a7fbf65a152ba4b210576f541ffc 100644 (file)
@@ -52,9 +52,10 @@ Imager::ImageTypes - Internal image representation information
     print "\n";
   
   } else {
-  
+    # palette info
+    my $count = $img->colorcount;  
     @colors = $img->getcolors();
-    print "Palette size: ".@colors."\n";
+    print "Palette size: $count\n";
     my $mx = @colors > 4 ? 4 : 0+@colors;
     print "First $mx entries:\n";
     for (@colors[0..$mx-1]) {
@@ -291,8 +292,17 @@ To quickly find a color in the palette use findcolor():
 
 which returns undef on failure, or the index of the color.
 
-You can get the current palette size with $img->colorcount, and the
-maximum size of the palette with $img->maxcolors.
+=item colorcount
+
+Returns the number of colors in the image's palette:
+
+  my $count = $img->colorcount;
+
+=item maxcolors
+
+Returns the maximum size of the image's palette.
+
+  my $maxcount = $img->maxcolors;
 
 =back