[gimp/gimp-attributes-wip: 90/91] Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip



commit 078a9b50285282cb36965b9383b4f08258ddbc51
Merge: 2bbd3f4 195d5c7
Author: Hartmut Kuhse <hk_priv gmx de>
Date:   Sun Oct 18 10:51:23 2015 +0200

    Merge remote-tracking branch 'remotes/origin/master' into gimp-attributes-wip
    
    Conflicts:
        libgimp/gimpimagemetadata.c
        libgimpbase/gimpbase.def
        libgimpbase/gimpmetadata.c
        libgimpbase/gimpmetadata.h

 app/Makefile.am                                  |    2 -
 app/actions/Makefile.am                          |    2 +
 app/actions/tool-presets-actions.c               |    8 +
 app/{batch.h => actions/tool-presets-commands.c} |   38 +-
 app/{batch.h => actions/tool-presets-commands.h} |   15 +-
 app/app.c                                        |    4 +-
 app/core/Makefile.am                             |    2 +
 app/{batch.c => core/gimp-batch.c}               |   49 +-
 app/{batch.h => core/gimp-batch.h}               |   16 +-
 app/core/gimp-palettes.c                         |    9 +
 app/core/gimp-palettes.h                         |   10 +-
 app/core/gimpcontext.c                           |    2 +-
 app/core/gimpdrawable-bucket-fill.c              |    6 +-
 app/core/gimpimage-color-profile.c               |  153 +-
 app/core/gimpimage-color-profile.h               |    9 +-
 app/core/gimpimage-private.h                     |    5 +
 app/core/gimpimage.c                             |   19 +-
 app/core/gimplayer.c                             |   19 +-
 app/core/gimppalette.c                           |   52 +
 app/core/gimppalette.h                           |    4 +
 app/core/gimppalettemru.c                        |   15 +-
 app/display/gimptoolgui.c                        |   15 +
 app/display/gimptoolgui.h                        |    1 +
 app/gui/dbus-service.xml                         |    6 +
 app/gui/gimpdbusservice.c                        |  142 +-
 app/main.c                                       |    3 +
 app/operations/gimpoperationadditionmode.c       |    2 +-
 app/operations/gimpoperationburnmode.c           |    4 +-
 app/operations/gimpoperationdividemode.c         |    2 +-
 app/operations/gimpoperationgrainextractmode.c   |    2 +-
 app/operations/gimpoperationgrainmergemode.c     |    2 +-
 app/operations/gimpoperationmultiplymode.c       |    3 +-
 app/operations/gimpoperationsubtractmode.c       |    3 +-
 app/paint/gimperaser.c                           |   17 +
 app/paint/gimpink.c                              |   48 +-
 app/paint/gimpmybrush.c                          |   64 +-
 app/paint/gimppaintbrush.c                       |   23 +
 app/paint/gimppaintoptions.c                     |   59 +-
 app/pdb/plug-in-compat-cmds.c                    |    7 +-
 app/plug-in/gimppluginprocedure.c                |    2 +-
 app/tools/gimpbucketfilloptions.c                |    7 +-
 app/tools/gimpbucketfilltool.c                   |    2 +-
 app/tools/gimpcagetool.c                         |    9 +-
 app/tools/gimpcolorpickeroptions.c               |    7 +-
 app/tools/gimpcolorpickertool.c                  |   32 +-
 app/tools/gimpconvolvetool.c                     |   19 +-
 app/tools/gimpcurvestool.c                       |   22 +-
 app/tools/gimpdodgeburntool.c                    |   19 +-
 app/tools/gimpeditselectiontool.c                |   47 +-
 app/tools/gimpfreeselecttool.c                   |    3 +-
 app/tools/gimpiscissorstool.c                    |   12 +-
 app/tools/gimpmeasuretool.c                      |   15 +-
 app/tools/gimpmoveoptions.c                      |    5 +-
 app/tools/gimpmovetool.c                         |    2 +-
 app/tools/gimpnpointdeformationtool.c            |    6 +-
 app/tools/gimppainttool.c                        |    4 +-
 app/tools/gimppainttool.h                        |    3 +
 app/tools/gimpperspectiveclonetool.c             |    6 +-
 app/tools/gimprectangletool.c                    |    4 +-
 app/tools/gimpsourcetool.c                       |    6 +-
 app/tools/gimpvectortool.c                       |   26 +-
 app/tools/gimpwarpoptions.c                      |    2 +-
 app/unique.c                                     |   94 +-
 app/unique.h                                     |    3 +
 app/widgets/gimpcolordialog.c                    |    2 -
 app/widgets/gimpdnd.c                            |   17 +-
 app/widgets/gimphelp-ids.h                       |    1 +
 app/widgets/gimptoolpresetfactoryview.c          |    9 +
 app/widgets/gimpwidgets-utils.c                  |   57 +-
 app/widgets/gimpwidgets-utils.h                  |    4 +-
 app/xcf/xcf-load.c                               |   21 +-
 app/xcf/xcf-private.h                            |    3 +-
 app/xcf/xcf-save.c                               |   17 +
 configure.ac                                     |    7 +
 cursors/Makefile.am                              |    7 +-
 libgimp/Makefile.am                              |    6 +-
 libgimp/gimp_pdb.c                               |   10 +-
 libgimp/gimpaspectpreview.c                      |  169 +-
 libgimp/gimpaspectpreview.h                      |    9 +-
 libgimp/gimpbrushes_pdb.c                        |   10 +-
 libgimp/gimpbuffer_pdb.c                         |   10 +-
 libgimp/gimpcontext_pdb.c                        |   10 +-
 libgimp/gimpdrawablepreview.c                    |  325 +-
 libgimp/gimpdrawablepreview.h                    |   21 +-
 libgimp/gimpdynamics_pdb.c                       |   10 +-
 libgimp/gimpfonts_pdb.c                          |   10 +-
 libgimp/gimpgradients_pdb.c                      |   10 +-
 libgimp/gimpimage_pdb.c                          |   10 +-
 libgimp/gimpimagecolorprofile.c                  |    4 +-
 libgimp/{gimpmetadata.c => gimpimagemetadata.c}  |   30 +-
 libgimp/{gimpmetadata.h => gimpimagemetadata.h}  |   10 +-
 libgimp/gimpitem_pdb.c                           |   10 +-
 libgimp/gimppalettes_pdb.c                       |   10 +-
 libgimp/gimppaths_pdb.c                          |   10 +-
 libgimp/gimppatterns_pdb.c                       |   10 +-
 libgimp/gimpproceduraldb_pdb.c                   |   10 +-
 libgimp/gimpui.def                               |    6 +
 libgimp/gimpui.h                                 |   22 +-
 libgimp/gimpzoompreview.c                        |  209 +-
 libgimp/gimpzoompreview.h                        |   25 +-
 libgimpbase/gimpbase.def                         |    5 +
 libgimpbase/gimpmetadata.c                       |  365 +-
 libgimpbase/gimpmetadata.h                       |   66 +-
 libgimpwidgets/Makefile.am                       |   12 +
 libgimpwidgets/gimpcolorscales.c                 |    4 +-
 libgimpwidgets/gimpcolorselect.c                 |  435 +-
 libgimpwidgets/gimppickbutton-default.c          |  280 +
 libgimpwidgets/gimppickbutton-quartz.c           |  413 +
 libgimpwidgets/gimppickbutton.c                  |  286 +-
 libgimpwidgets/gimpruler.c                       |   90 +-
 menus/tool-presets-menu.xml                      |    1 +
 plug-ins/common/blinds.c                         |    2 +-
 plug-ins/common/blur-gauss-selective.c           |   13 +-
 plug-ins/common/border-average.c                 |   22 +-
 plug-ins/common/cartoon.c                        |    2 +-
 plug-ins/common/checkerboard.c                   |    2 +-
 plug-ins/common/color-cube-analyze.c             |   13 +-
 plug-ins/common/colorify.c                       |    4 +-
 plug-ins/common/contrast-retinex.c               |    2 +-
 plug-ins/common/despeckle.c                      |    2 +-
 plug-ins/common/destripe.c                       |    2 +-
 plug-ins/common/edge-dog.c                       |    4 +-
 plug-ins/common/edge-neon.c                      |    2 +-
 plug-ins/common/emboss.c                         |    2 +-
 plug-ins/common/file-header.c                    |   43 +-
 plug-ins/common/file-pdf-save.c                  |    4 +-
 plug-ins/common/file-tiff-load.c                 |  595 +-
 plug-ins/common/fractal-trace.c                  |   10 +-
 plug-ins/common/grid.c                           |    2 +-
 plug-ins/common/jigsaw.c                         |    2 +-
 plug-ins/common/max-rgb.c                        |    2 +-
 plug-ins/common/newsprint.c                      |    2 +-
 plug-ins/common/nl-filter.c                      |    2 +-
 plug-ins/common/oilify.c                         |    2 +-
 plug-ins/common/photocopy.c                      |   30 +-
 plug-ins/common/ripple.c                         |    2 +-
 plug-ins/common/sharpen.c                        |    2 +-
 plug-ins/common/softglow.c                       |    2 +-
 plug-ins/common/sparkle.c                        |    2 +-
 plug-ins/common/unsharp-mask.c                   |    2 +-
 plug-ins/file-exr/Makefile.am                    |    2 +
 plug-ins/file-exr/file-exr.c                     |   24 +
 plug-ins/file-exr/openexr-wrapper.cc             |   76 +
 plug-ins/file-exr/openexr-wrapper.h              |    5 +
 plug-ins/file-ico/ico-save.c                     |   15 +-
 plug-ins/pygimp/gimpmodule.c                     |   21 +-
 plug-ins/pygimp/pygimp-drawable.c                |   21 +-
 plug-ins/pygimp/pygimp-image.c                   |   22 +-
 plug-ins/pygimp/pygimp-vectors.c                 |   21 +-
 po-libgimp/POTFILES.in                           |    2 +-
 po-libgimp/sk.po                                 |  159 +-
 po-libgimp/sr.po                                 |  221 +-
 po-plug-ins/sr.po                                |10174 +++---
 po-python/sr.po                                  |  246 +-
 po-script-fu/el.po                               |  194 +-
 po-script-fu/pt.po                               | 2089 +-
 po-script-fu/sr.po                               |  175 +-
 po/POTFILES.in                                   |    2 +-
 po/el.po                                         |    2 +-
 po/es.po                                         |40019 +++++++++++-----------
 po/fi.po                                         |11764 +++++---
 po/pt.po                                         |  609 +-
 po/sk.po                                         | 2065 +-
 po/sl.po                                         |    2 +-
 po/sr.po                                         | 3793 ++-
 po/sv.po                                         |    2 +-
 tools/pdbgen/lib.pl                              |   31 +-
 tools/pdbgen/pdb/plug_in_compat.pdb              |    7 +-
 168 files changed, 42201 insertions(+), 34605 deletions(-)
---
diff --cc libgimp/gimpimagemetadata.c
index e5d6e12,a65dffc..8370400
--- a/libgimp/gimpimagemetadata.c
+++ b/libgimp/gimpimagemetadata.c
@@@ -27,8 -27,7 +27,8 @@@
  
  #include "gimp.h"
  #include "gimpui.h"
- #include "gimpmetadata.h"
+ #include "gimpimagemetadata.h"
 +#include "libgimpbase/gimpbase.h"
  
  #include "libgimp-intl.h"
  
@@@ -196,35 -177,39 +196,43 @@@ gimp_image_metadata_load_finish (gint3
  
    if (flags & GIMP_METADATA_LOAD_COLORSPACE)
      {
-       gchar *value;
+       GimpColorProfile *profile = gimp_image_get_color_profile (image_ID);
 +      GimpAttribute *attribute = NULL;
  
 -      /* only look for colorspace information from metadata if the
 -       * image didn't contain an embedded color profile
 -       */
 -      if (! profile)
 +      attribute = gimp_attributes_get_attribute (attributes, "Exif.Iop.InteroperabilityIndex");
 +      if (attribute)
 +         value = gimp_attribute_get_string (attribute);
 +      value = gexiv2_metadata_get_tag_interpreted_string (metadata,
 +                                                          "Exif.Iop.InteroperabilityIndex");
 +
 +      if (! g_strcmp0 (value, "R03"))
          {
-           GimpColorProfile *profile = gimp_image_get_color_profile (image_ID);
+           GimpMetadataColorspace colorspace;
  
-           if (! profile)
+           colorspace = gimp_metadata_get_colorspace (metadata);
+ 
+           switch (colorspace)
              {
-               /* honor the R03 InteroperabilityIndex only if the
-                * image didn't contain an ICC profile
-                */
+             case GIMP_METADATA_COLORSPACE_UNSPECIFIED:
+             case GIMP_METADATA_COLORSPACE_UNCALIBRATED:
+             case GIMP_METADATA_COLORSPACE_SRGB:
+               /* use sRGB, a NULL profile will do the right thing  */
+               break;
+ 
+             case GIMP_METADATA_COLORSPACE_ADOBERGB:
                profile = gimp_color_profile_new_adobe_rgb ();
-               gimp_image_set_color_profile (image_ID, profile);
+               break;
              }
  
-           g_object_unref (profile);
+           if (profile)
+             gimp_image_set_color_profile (image_ID, profile);
          }
  
-       g_free (value);
+       if (profile)
+         g_object_unref (profile);
      }
  
 -  gimp_image_set_metadata (image_ID, metadata);
 +      g_object_unref (attributes);
  }
  
  /**
diff --cc libgimpbase/gimpbase.def
index 0a64900,32e7ff9..a339991
--- a/libgimpbase/gimpbase.def
+++ b/libgimpbase/gimpbase.def
@@@ -116,8 -75,13 +120,9 @@@ EXPORT
        gimp_metadata_load_from_file
        gimp_metadata_new
        gimp_metadata_save_to_file
 -      gimp_metadata_serialize
 -      gimp_metadata_set_bits_per_sample
+       gimp_metadata_set_colorspace
        gimp_metadata_set_from_exif
        gimp_metadata_set_from_xmp
 -      gimp_metadata_set_pixel_size
 -      gimp_metadata_set_resolution
        gimp_micro_version
        gimp_minor_version
        gimp_offset_type_get_type


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]