1. 07 Jan, 2019 1 commit
  2. 06 Jan, 2019 1 commit
    • Michael Natterer's avatar
      Issue #1437 - 2.10 Image Metadata "keywords" corrupt · d708ac0b
      Michael Natterer authored
      We were not taking into account tags that can appear multiple times,
      such as "keyword", they are handled by gexiv2 with the
      get_tag_multiple() and set_tag_multiple() functions.
      
      gimp_metadata_deserialize_text(): when deserializing our XML format,
      check if a tag is already set on the metadata as "multiple" and if yes
      retrieve it, append the new value and set it again.
      
      gimp_image_metadata_save_finish(): take care of "multiple" values when
      copying tags to new metadata created for saving.
      
      This should preserve all values across an "import, edit, export".
      
      Thing will still break when using the metadata editor, it doesn't
      handle multiple values at all, but that code is very hard to
      understand.
      d708ac0b
  3. 02 Jan, 2019 2 commits
  4. 14 Dec, 2018 1 commit
  5. 12 Dec, 2018 1 commit
    • Jehan's avatar
      app: do not make line art bucket fill a GimpSelectCriterion anymore. · cd924f45
      Jehan authored
      This was my initial choice, but the more I think about it, the less I am
      sure this was the right choice. There was some common code (as I was
      making a common composite bucket fill once the line art was generated),
      but there is also a lot of different code and the functions were filled
      of exception when we were doing a line art fill. Also though there is a
      bit of color works (the way we decide whether a pixel is part of a
      stroke or not, though currently this is basic grayscale threshold), this
      is really not the same as other criterions. In particular this was made
      obvious on the Select by Color tool where the line art criterion was
      completely meaningless and would have had to be opted-out!
      
      This commit split a bit the code. Instead of finding the line art in the
      criterion list, I add a third choice to the "Fill whole selection"/"Fill
      similar colors" radio. In turn I create a new GimpBucketFillArea type
      with the 3 choices, and remove line art value from GimpSelectCriterion.
      
      I am not fully happy yet of this code, as it creates a bit of duplicate
      code, and I would appreciate to move some code away from gimpdrawable-*
      and gimppickable-* files. This may happen later. I break the work in
      pieces to not get too messy.
      Also this removes access to the smart colorization from the API, but
      that's probably ok as I prefer to not freeze options too early in the
      process since API needs to be stable. Probably we should get a concept
      of experimental API.
      cd924f45
  6. 04 Dec, 2018 1 commit
    • Michael Natterer's avatar
      Integrate the logic of profile saving with metadata saving · c667fdc5
      Michael Natterer authored
      Add flag GIMP_METADATA_SAVE_COLOR_PROFILE to GimpMetadataSaveFlags and
      initialize it from gimp_export_color_profile() in
      gimp_image_metadata_save_prepare().
      
      Adapt all plug-ins to use the bit from the suggested export flags and
      pass the actually used value back to
      gimp_image_metadata_save_finish().
      
      This changes no behavior at all but creates hooks on the libgimp side
      that are called with the context of an image before and after the
      actual export, which might become useful later. Also, consistency
      is good even though the color profile is not strictly "metadata".
      c667fdc5
  7. 19 Nov, 2018 3 commits
  8. 18 Nov, 2018 1 commit
    • Michael Natterer's avatar
      Issue #2224 - Use the "Swap folder" setting for the GEGL cache · a29f73bd
      Michael Natterer authored
      Move swap/cache and temporary files out the GIMP user config dir:
      
      libgimpbase: add gimp_cache_directory() and gimp_temp_directory()
      which return the new default values inside XDG_CACHE_HOME and the
      system temp directory. Like all directories from gimpenv.[ch] the
      values can be overridden by environment variables. Improve API docs
      for all functions returning directories.
      
      Add new config file substitutions ${gimp_cache_dir} and
      ${gimp_temp_dir}.
      
      Document all the new stuff in the gimp and gimprc manpages.
      
      app: default "swap-path" and "temp-path" to the new config file
      substitutions. On startup and config changes, make sure that the swap
      and temp directories actually exist.
      
      In the preferences dialog, add reset buttons to all file path pages.
      a29f73bd
  9. 14 Nov, 2018 1 commit
    • Jehan's avatar
      app, libgimpbase: add GIMP_SELECT_CRITERION_LINE_ART selection type. · 8ed12b1b
      Jehan authored
      This commit implements part of the research paper "A Fast and Efficient
      Semi-guided Algorithm for Flat Coloring Line-arts" from the GREYC (the
      people from G'Mic). It is meant to select regions from drawn sketchs in
      a "smart" way, in particular it tries to close non-perfectly closed
      regions, which is a common headache for digital painters and colorists.
      
      The implementation is not finished as it needs some watersheding as well
      so that the selected area does not leave "holes" near stroke borders.
      The research paper proposes a new watersheding algorithm, but I may not
      have to implement it, as it is more focused on automatic colorization
      with prepared spots (instead of bucket fill-type interaction).
      
      This will be used in particular with the fuzzy select and bucket fill
      tools.
      
      Note that this first version is a bit slow once we get to big images,
      but I hope to be able to optimize this.
      Also no options from the algorithm are made available in the GUI yet.
      8ed12b1b
  10. 22 Oct, 2018 1 commit
  11. 08 Oct, 2018 1 commit
  12. 03 Oct, 2018 1 commit
    • Ell's avatar
      Issue #2303 - Please add Constant type of gradient interpolation ... · 68bf99e8
      Ell authored
      ... to make multi-color hard-edge gradient fills possible
      
      Add a new "step" gradient-segment blending function, which is 0
      before the midpoint, and 1 at, and after, the midpoint.  This
      creates a hard-edge transition between the two adjacent color stops
      at the midpoint.  Creating such a transition was already possible,
      but required duplicating the same color at the opposing ends of two
      adjacent stops, which is cumbersome.
      68bf99e8
  13. 10 Aug, 2018 1 commit
    • Jehan's avatar
      Issue #1999: Opening the Preferences dialogue triggers Xcode warning. · 04bbe941
      Jehan authored
      It seems that calling `lldb` when it is absent triggers some popup
      proposing to install Xcode on macOS. This is obviously not good. Let's
      check presence with g_find_program_in_path() instead. I was refraining
      from doing so until now, because this function allocates memory, hence
      may not do well during a crash.
      Fortunately we don't need to check for lldb during crash (unlike gdb
      which has some unacceptable behavior for older versions, at least on
      FreeBSD) so that should be ok.
      04bbe941
  14. 02 Aug, 2018 2 commits
  15. 30 Jul, 2018 1 commit
    • ONO Yoshio's avatar
      MR !19: Add support for vertical text writing. · 587d9bbb
      ONO Yoshio authored
      Squashed commit of the following:
      
      commit ee1ff7d502658cfa1248a13a3f0348495db07eda
      Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
      Date:   Sun Jul 29 00:31:47 2018 +0900
      
          Fixed that gimp-text-dir-ttb-* icons are lacked in Symbolic.
      
      commit d87d012d697628da28fe90199cc04b95b72ba8ef
      Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
      Date:   Sat Jul 28 16:23:10 2018 +0900
      
          Fix a typo.
      
      commit cf0238bf7df56c384cdf3b7ec69557d14740f853
      Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
      Date:   Sat Jul 28 15:50:57 2018 +0900
      
          Fixed seg fault error.
      
      commit b07f60d06fa1a753fda5b4d46af01698c344154e
      Author: ONO Yoshio <ohtsuka.yoshio@gmail.com>
      Date:   Fri Jul 27 17:15:34 2018 +0900
      
          Add support for vertical text writing.
      
          GNOME/gimp#641
      587d9bbb
  16. 21 Jul, 2018 1 commit
    • Michael Natterer's avatar
      Initial space invasion commit in GIMP · e09e563a
      Michael Natterer authored
      All babl formats now have a space equivalent to a color profile,
      determining the format's primaries and TRCs. This commit makes GIMP
      aware of this.
      
      libgimp:
      
      - enum GimpPrecision: rename GAMMA values to NON_LINEAR and keep GAMMA
        as deprecated aliases, add PERCEPTUAL values so we now have LINEAR,
        NON_LINEAR and PERCPTUAL for each encoding, matching the babl
        encoding variants RGB, R'G'B' and R~G~B~.
      
      - gimp_color_transform_can_gegl_copy() now returns TRUE if both
        profiles can return a babl space, increasing the amount of fast babl
        color conversions significantly.
      
      - TODO: no solution yet for getting libgimp drawable proxy buffers in
        the right format with space.
      
      plug-ins:
      
      - follow the GimpPrecision change.
      
      - TODO: everything else unchanged and partly broken or sub-optimal,
        like setting a new image's color profile too late.
      
      app:
      
      - add enum GimpTRCType { LINEAR, NON_LINEAR, PERCEPTUAL } as
        replacement for all "linear" booleans.
      
      - change gimp-babl functions to take babl spaces and GimpTRCType
        parameters and support all sorts of new perceptual ~ formats.
      
      - a lot of places changed in the early days of goat invasion didn't
        take advantage of gimp-babl utility functions and constructed
        formats manually. They all needed revisiting and many now use much
        simpler code calling gimp-babl API.
      
      - change gimp_babl_format_get_color_profile() to really extract a
        newly allocated color profile from the format, and add
        gimp_babl_get_builtin_color_profile() which does the same as
        gimp_babl_format_get_color_profile() did before. Visited all callers
        to decide whether they are looking for the format's actual profile,
        or for one of the builtin profiles, simplifying code that only needs
        builtin profiles.
      
      - drawables have a new get_space_api(), get_linear() is now get_trc().
      
      - images now have a "layer space" and an API to get it,
        gimp_image_get_layer_format() returns formats in that space.
      
      - an image's layer space is created from the image's color profile,
        change gimpimage-color-profile to deal with that correctly
      
      - change many babl_format() calls to babl_format_with_space() and take
        the space from passed formats or drawables
      
      - add function gimp_layer_fix_format_space() which replaces the
        layer's buffer with one that has the image's layer format, but
        doesn't change pixel values
      
      - use gimp_layer_fix_format_space() to make sure layers loaded from
        XCF and created by plug-ins have the right space when added to the
        image, because it's impossible to always assign the right space upon
        layer creation
      
      - "assign color profile" and "discard color profile" now require use
        of gimp_layer_fix_format_space() too because the profile is now
        embedded in all formats via the space.  Add
        gimp_image_assign_color_profile() which does all that and call it
        instead of a simple gimp_image_set_color_profile(), also from the
        PDB set-color-profile functions, which are essentially "assign" and
        "discard" calls.
      
      - generally, make sure a new image's color profile is set before
        adding layers to it, gimp_image_set_color_profile() is more than
        before considered know-what-you-are-doing API.
      
      - take special precaution in all places that call
        gimp_drawable_convert_type(), we now must pass a new_profile from
        all callers that convert layers within the same image (such as
        image_convert_type, image_convert_precision), because the layer's
        new space can't be determined from the image's layer format during
        the call.
      
      - change all "linear" properties to "trc", in all config objects like
        for levels and curves, in the histogram, in the widgets. This results
        in some GUI that now has three choices instead of two.
        TODO: we might want to reduce that back to two later.
      
      - keep "linear" boolean properties around as compat if needed for file
        pasring, but always convert the parsed parsed boolean to
        GimpTRCType.
      
      - TODO: the image's "enable color management" switch is currently
        broken, will fix that in another commit.
      e09e563a
  17. 14 Jul, 2018 1 commit
  18. 13 Jul, 2018 1 commit
  19. 11 Jul, 2018 1 commit
  20. 08 Jul, 2018 1 commit
  21. 06 Jul, 2018 1 commit
  22. 27 Jun, 2018 3 commits
  23. 24 Jun, 2018 2 commits
    • Jehan's avatar
      libgimpbase: fix declaration after statement and reset safecheck... · 49b4b1a5
      Jehan authored
      ... after each successful read().
      I completely missed this declaration after a statement during the review
      of !13 even though I saw another similar issue!
      
      Also let's reset the error counter to 0 each time a successful read()
      happens so that we can continue reading even if a lot of EINTR were to
      happen, as long as we globally go forward. Only consecutive errors
      increment the counter.
      
      Finally add a small comment to explain why we let EINTR pass instead of
      breaking directly.
      49b4b1a5
    • Alex Samorukov's avatar
      Fix empty lldb backtrace on OSX · 559d9b89
      Alex Samorukov authored
      When lldb attaching to the process it triggers few "-1" errors on read with
      EINTR error. After 1-2 errors read() call works again.
      Also this patch fixing TID detection, syscall SYS_gettid is oficially deprecated
      now and does not work. Also adding safecheck to avoid enldless loop.
      559d9b89
  24. 18 Jun, 2018 1 commit
  25. 06 Jun, 2018 1 commit
    • Michael Natterer's avatar
      app, libgimp*: remove the config option to disable tooltips · b3620517
      Michael Natterer authored
      Also remove all traces of it from the plug-in protocol and raise the
      protocol version to 0x0100 (we now allow features and therefore
      version bumps in stable, and the master protocol version should always
      be higher). Fix the code that aborts plug-in startup on protocol
      version mismatch, we can't use gimp_message() because we have no
      protocol.
      b3620517
  26. 29 May, 2018 1 commit
    • Ell's avatar
      libgimpbase, libgimp, app: pass icon theme dir to plug-ins through config · 97925de8
      Ell authored
      Pass the current icon theme directory to plug-ins through the
      config message, and add a gimp_icon_theme_dir() libgimp function
      for retrieving it.  Note that we already have a similar
      gimp_icon_get_theme_dir() PDB function, which we keep around, since
      it can be used to dynamically query for the current icon dir,
      unlike the former, and since it returns a dynamically-allocated
      string, while the rest of the config-related functions return
      statically allocated strings.
      
      Use the new function, instead of gimp_get_icon_theme_dir(), in
      gimp_ui_init().  This allows gimp_ui_init() to run without making
      any PDB calls.  Consequently, this allows us to start plug-ins that
      call gimp_ui_init() without entering the main loop in the main app.
      We're going to add a plug-in that displays an interactive dialog
      while the main app is blocking waiting for an operation to
      complete, and we need to be able to start the plug-in without
      entering the main loop, to avoid the possibility of arbitrary code
      being executed during the wait.
      
      Bump the protocol version.
      97925de8
  27. 25 May, 2018 1 commit
  28. 20 May, 2018 5 commits
  29. 18 May, 2018 1 commit