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:
circle() - L<Imager::Draw/circle>
+colorcount() - L<Imager::Draw/colorcount>
+
convert() - L<Imager::Transformations/"Color transformations"> -
transform the color space
matrix_transform() - L<Imager::Engines/"Matrix Transformations">
+maxcolors() - L<Imager::ImageTypes/maxcolor>
+
new() - L<Imager::ImageTypes>
open() - L<Imager::Files> - an alias for read()
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]) {
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