core: Copy simulation settings when duplicating images
Among other issues, this bug impacted exporting images with CMYK simulation profiles. Because the image was duplicated for export, we lose the simulation profile information after gimp_export_options_get_image () is called. This patch ensures the profile, simulation intent, and simulation black point compensation toggles are carried over to the new image.
This commit is contained in:
parent
54c92db299
commit
d8df72869f
1 changed files with 23 additions and 0 deletions
|
|
@ -85,6 +85,9 @@ static void gimp_image_duplicate_parasites (GimpImage *image,
|
|||
GimpImage *new_image);
|
||||
static void gimp_image_duplicate_color_profile (GimpImage *image,
|
||||
GimpImage *new_image);
|
||||
static void gimp_image_duplicate_simulation_profile
|
||||
(GimpImage *image,
|
||||
GimpImage *new_image);
|
||||
|
||||
|
||||
GimpImage *
|
||||
|
|
@ -118,6 +121,9 @@ gimp_image_duplicate (GimpImage *image)
|
|||
gimp_image_duplicate_parasites (image, new_image);
|
||||
gimp_image_duplicate_color_profile (image, new_image);
|
||||
|
||||
/* Copy the simulation profile settings */
|
||||
gimp_image_duplicate_simulation_profile (image, new_image);
|
||||
|
||||
/* Copy the colormap if necessary */
|
||||
gimp_image_duplicate_colormap (image, new_image);
|
||||
|
||||
|
|
@ -585,3 +591,20 @@ gimp_image_duplicate_color_profile (GimpImage *image,
|
|||
gimp_image_set_color_profile (new_image, profile, NULL);
|
||||
_gimp_image_set_hidden_profile (new_image, hidden, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_image_duplicate_simulation_profile (GimpImage *image,
|
||||
GimpImage *new_image)
|
||||
{
|
||||
GimpColorProfile *profile;
|
||||
GimpColorRenderingIntent intent;
|
||||
gboolean bpc;
|
||||
|
||||
profile = gimp_image_get_simulation_profile (image);
|
||||
intent = gimp_image_get_simulation_intent (image);
|
||||
bpc = gimp_image_get_simulation_bpc (image);
|
||||
|
||||
gimp_image_set_simulation_profile (new_image, profile);
|
||||
gimp_image_set_simulation_intent (new_image, intent);
|
||||
gimp_image_set_simulation_bpc (new_image, bpc);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue