+2011-03-11 6.6.8-4 Glenn Randers-Pehrson <glennrp@image...>
+ * Don't try to store a bKGD chunk in a PNG8 when there are already
+ 256 colors in the palette and the background colors is not in that
+ palette (reference
+ http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=18199);
+
2011-03-10 6.6.8-4 Cristy <quetzlzacatenango@image...>
* Fx is a mathematicals function. Do not treat transparency as black.
*/
for (i=0; i<number_opaque; i++)
{
- if (IsColorEqual(opaque+i,
- &image->background_color))
+ if (IsColorEqual(opaque+i, &image->background_color))
break;
}
opaque[i].opacity = OpaqueOpacity;
number_opaque++;
}
+ else if (logging != MagickFalse)
+ (void) LogMagickEvent(CoderEvent,GetMagickModule(),
+ " No room in the colormap to add background color");
}
image_colors=number_opaque+number_transparent+number_semitransparent;
+ if (mng_info->write_png8 != MagickFalse && image_colors > 256)
+ {
+ /* No room for the background color; remove it. */
+ number_opaque--;
+ image_colors--;
+ }
+
if (logging != MagickFalse)
{
if (image_colors > 256)