]> git.imager.perl.org - imager.git/commitdiff
- maxcolors now must be at least 1 when creating a paletted image.
authorTony Cook <tony@develop=help.com>
Mon, 31 Oct 2005 04:47:08 +0000 (04:47 +0000)
committerTony Cook <tony@develop=help.com>
Mon, 31 Oct 2005 04:47:08 +0000 (04:47 +0000)
Changes
palimg.c

diff --git a/Changes b/Changes
index 731333d98f37509baf66514dd3888155f6ddfe34..4b306ab6ba532556d2d83c06cac3abf78c502f0e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1162,6 +1162,7 @@ Revision history for Perl extension Imager.
 - you can now supply a page parameter to read() to read a given page
   from a GIF file.
 - reading a multi-image GIF was leaking memory (a line buffer per file)
+- maxcolors now must be at least 1 when creating a paletted image.
 
 =================================================================
 
index 1667238ec57b0d3bf94f47044526a3a48122be1e..886697b6d51d2a01dade7d0d9da6e82708b41d2c 100644 (file)
--- a/palimg.c
+++ b/palimg.c
@@ -87,7 +87,7 @@ i_img *i_img_pal_new_low(i_img *im, int x, int y, int channels, int maxpal) {
   int bytes;
 
   i_clear_error();
-  if (maxpal < 0 || maxpal > 256) {
+  if (maxpal < 1 || maxpal > 256) {
     i_push_error(0, "Maximum of 256 palette entries");
     return NULL;
   }