mirror of https://github.com/GNOME/gimp.git
app/core: Only restrict palette for indexed images
Moves gimp_palette_restrict_format () call to after check for private->palette not being NULL, so it doesn't run for RGB/Grayscale images.
This commit is contained in:
parent
bf513fac4d
commit
ec80baf414
|
@ -162,8 +162,6 @@ gimp_image_colormap_update_formats (GimpImage *image)
|
|||
&private->babl_palette_rgba);
|
||||
|
||||
format = gimp_babl_format (GIMP_RGB, private->precision, FALSE, space),
|
||||
gimp_palette_restrict_format (private->palette, format, FALSE);
|
||||
|
||||
g_free (format_name);
|
||||
|
||||
if (private->palette && gimp_palette_get_n_colors (private->palette) > 0)
|
||||
|
@ -171,6 +169,8 @@ gimp_image_colormap_update_formats (GimpImage *image)
|
|||
guchar *colormap;
|
||||
gint n_colors;
|
||||
|
||||
gimp_palette_restrict_format (private->palette, format, FALSE);
|
||||
|
||||
colormap = _gimp_image_get_colormap (image, &n_colors);
|
||||
g_return_if_fail (colormap != NULL);
|
||||
|
||||
|
|
Loading…
Reference in New Issue