mirror of https://github.com/GNOME/gimp.git
plug-ins/winicon/icodialog.c fixed handling of indexed images (bug
2006-08-24 Sven Neumann <sven@gimp.org> * plug-ins/winicon/icodialog.c * plug-ins/winicon/icosave.c: fixed handling of indexed images (bug #342883).
This commit is contained in:
parent
62b28f4452
commit
a1b1fb7530
|
@ -1,3 +1,9 @@
|
|||
2006-08-24 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/winicon/icodialog.c
|
||||
* plug-ins/winicon/icosave.c: fixed handling of indexed images
|
||||
(bug #342883).
|
||||
|
||||
2006-08-24 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* configure.in: add -Wdeclaration_after_statement to the CFLAGS if
|
||||
|
|
|
@ -251,7 +251,20 @@ ico_specs_dialog_update_icon_preview (GtkWidget *dialog,
|
|||
guchar *buffer;
|
||||
|
||||
image = gimp_drawable_get_image (layer);
|
||||
|
||||
tmp_image = gimp_image_new (w, h, gimp_image_base_type (image));
|
||||
gimp_image_undo_disable (tmp_image);
|
||||
|
||||
if (gimp_drawable_is_indexed (layer))
|
||||
{
|
||||
guchar *cmap;
|
||||
gint num_colors;
|
||||
|
||||
cmap = gimp_image_get_colormap (image, &num_colors);
|
||||
gimp_image_set_colormap (tmp_image, cmap, num_colors);
|
||||
g_free (cmap);
|
||||
}
|
||||
|
||||
tmp_layer = gimp_layer_new (tmp_image, "temporary", w, h,
|
||||
gimp_drawable_type (layer),
|
||||
100, GIMP_NORMAL_MODE);
|
||||
|
|
|
@ -883,6 +883,16 @@ ico_image_get_reduced_buf (guint32 layer,
|
|||
gimp_image_base_type (image));
|
||||
gimp_image_undo_disable (tmp_image);
|
||||
|
||||
if (gimp_drawable_is_indexed (layer))
|
||||
{
|
||||
guchar *cmap;
|
||||
gint num_colors;
|
||||
|
||||
cmap = gimp_image_get_colormap (image, &num_colors);
|
||||
gimp_image_set_colormap (tmp_image, cmap, num_colors);
|
||||
g_free (cmap);
|
||||
}
|
||||
|
||||
tmp_layer = gimp_layer_new (tmp_image, "tmp", w, h,
|
||||
gimp_drawable_type (layer),
|
||||
100, GIMP_NORMAL_MODE);
|
||||
|
|
Loading…
Reference in New Issue