[gimp/alxsa-duotone-psd-export] Disable profile when saving duotone
- From: Alx Sa <sawyeralex src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/alxsa-duotone-psd-export] Disable profile when saving duotone
- Date: Tue, 16 Aug 2022 11:28:44 +0000 (UTC)
commit edabfe412a7b75a062952e4bef8596ffac10e250
Author: Alx Sa <cmyk student gmail com>
Date: Tue Aug 16 11:28:42 2022 +0000
Disable profile when saving duotone
plug-ins/file-psd/psd-save.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-save.c b/plug-ins/file-psd/psd-save.c
index 470f0eb198..d0fec86885 100644
--- a/plug-ins/file-psd/psd-save.c
+++ b/plug-ins/file-psd/psd-save.c
@@ -140,7 +140,8 @@ static void save_color_mode_data (GOutputStream *output,
gboolean export_duotone);
static void save_resources (GOutputStream *output,
- GimpImage *image);
+ GimpImage *image,
+ gboolean export_duotone);
static void save_layer_and_mask (GOutputStream *output,
GimpImage *image);
@@ -632,7 +633,8 @@ save_color_mode_data (GOutputStream *output,
static void
save_resources (GOutputStream *output,
- GimpImage *image)
+ GimpImage *image,
+ gboolean export_duotone)
{
GList *iter;
gint i;
@@ -910,9 +912,10 @@ save_resources (GOutputStream *output,
/* --------------- Write ICC profile data ------------------- */
{
- GimpColorProfile *profile;
+ GimpColorProfile *profile = NULL;
- profile = gimp_image_get_effective_color_profile (image);
+ if (! export_duotone)
+ profile = gimp_image_get_effective_color_profile (image);
if (profile)
{
@@ -1878,7 +1881,7 @@ save_image (GFile *file,
save_header (output, image, config_duotone);
save_color_mode_data (output, image, config_duotone);
- save_resources (output, image);
+ save_resources (output, image, config_duotone);
/* PSD format does not support layers in indexed images */
@@ -2079,9 +2082,9 @@ save_dialog (GimpImage *image,
GimpProcedure *procedure,
GObject *config)
{
- GtkWidget *dialog;
- GtkWidget *duotone_notice;
- gboolean run;
+ GtkWidget *dialog;
+ GtkWidget *duotone_notice;
+ gboolean run;
dialog = gimp_procedure_dialog_new (procedure,
GIMP_PROCEDURE_CONFIG (config),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]