mirror of https://github.com/GNOME/gimp.git
handle an empty colormap. Fixes bug #143009.
2004-05-27 Sven Neumann <sven@gimp.org> * plug-ins/common/png.c (respin_cmap): handle an empty colormap. Fixes bug #143009.
This commit is contained in:
parent
9c2ac01ec2
commit
a5269a0d00
|
@ -1,3 +1,8 @@
|
|||
2004-05-27 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/png.c (respin_cmap): handle an empty colormap.
|
||||
Fixes bug #143009.
|
||||
|
||||
2004-05-27 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpwidgets/gimppickbutton.c: applied patch from Philip
|
||||
|
|
|
@ -1471,15 +1471,25 @@ respin_cmap (png_structp pp,
|
|||
GimpDrawable * drawable)
|
||||
{
|
||||
static const guchar trans[] = { 0 };
|
||||
gint colors;
|
||||
guchar *before;
|
||||
gint transparent;
|
||||
gint cols, rows;
|
||||
GimpPixelRgn pixel_rgn;
|
||||
guchar *pixels;
|
||||
|
||||
gint colors;
|
||||
guchar *before;
|
||||
gint transparent;
|
||||
gint cols, rows;
|
||||
GimpPixelRgn pixel_rgn;
|
||||
guchar *pixels;
|
||||
|
||||
before = gimp_image_get_cmap (image_ID, &colors);
|
||||
|
||||
/*
|
||||
* Make sure there is something in the colormap.
|
||||
*/
|
||||
if (colors == 0)
|
||||
{
|
||||
before = g_new0 (guchar, 3);
|
||||
colors = 1;
|
||||
}
|
||||
|
||||
cols = drawable->width;
|
||||
rows = drawable->height;
|
||||
|
||||
|
|
Loading…
Reference in New Issue