1. 18 Jun, 2019 3 commits
    • Jehan's avatar
      plug-ins: avoid converting TIFF extra channels for 8-bit non-linear too. · 3c0f7f00
      Jehan authored
      Complete commit ac8ad13f.
      Channels are Y' on 8-bit non-linear images. So to avoid data conversion,
      this is the only case where we want to consider TIFF channels to be Y'
      as well.
      3c0f7f00
    • Thomas Manni's avatar
      Foreground-select Tool: new Preview Mode and color selector for "On color" preview · d6bcb16b
      Thomas Manni authored
      This commit adds a new preview called "Grayscale", allowing to see the
      resulting mask in black and white. The previous preview is now called
      "On color" and allow users to choose the color and opacity, instead of
      imposing only 4 colors (red, green, blue, grey).
      d6bcb16b
    • Jehan's avatar
      plug-ins: avoid converting TIFF channels. · ac8ad13f
      Jehan authored
      In GIMP, our channels (the ones from Channels dock) are always linear,
      and don't follow the image/profile TRC. When a TIFF image has extra
      channels (no semantic attached), we probably want to load the channel
      as-is, without converting the values. So let's assume that TIFF extra
      samples with "Unspecified data" in it are linear data. This way, their
      values goes copied straight into a channel.
      ac8ad13f
  2. 17 Jun, 2019 2 commits
    • Jehan's avatar
      plug-ins: fix tiff load of grayscale images without alpha. · 348c9c22
      Jehan authored
      Though we were checking the profile, both code paths were importing
      from non-linear data.
      348c9c22
    • Jehan's avatar
      Issue #3493: GIMP changes R-channel, when it should not. · 7cf98231
      Jehan authored
      Instead of treating any unspecified TIFF channel as non-premultiplied
      alpha, let's now ask the user (in non-interactive case, we continue
      defaulting to non-premultiplied channel and outputing a message). The 3
      choices are: premultiplied, non-premultiplied (which is the default so
      you can just hit Enter and get same result as previously) and channel.
      
      It's still not perfect as it still assumes that an alpha channel will
      necessarily be the first extra channel (though the spec does not mandate
      such assumption). Let's say for now that it is enough. Using extra
      channels for the alpha channel only is most likely the most common usage
      (actually the spec only has specific types for such usage).
      7cf98231
  3. 16 Jun, 2019 8 commits
    • Michael Natterer's avatar
    • Jehan's avatar
      app: commit the free selection before floating it. · 50f8cb85
      Jehan authored
      When using a selection modifier Altr+Ctrl|Shift, we want to commit the
      selection. If I do it too late though, and if the polygon was not closed
      yet, the computed coordinates for the floating selection end up (0, 0)
      because it is based on the selection coordinates (yet an unclosed
      polygon does not create a selection yet). So commit the tool from within
      GimpSelectionTool instead, as soon as we confirmed that the class is
      going to take over with SELECTION_MOVE or SELECTION_MOVE_COPY.
      
      Note: ability of quick copying|cuting an unclosed polygon is very useful
      as it removes the additional step for a case where anyway committing the
      selection was a prerequisite.
      50f8cb85
    • Jehan's avatar
      Issue #3514: Free Select tool: Alt-Ctrl|Shift not working unless... · c9a91b32
      Jehan authored
      ... selection is committed;
      Fast copy|cut-paste modifiers in selection tools were not working with
      the Free Select tool, even when the polygon was closed. The reason was
      that GimpPolygonSelectTool was not properly chaining up with the parent
      implementation for oper_update(), and then upon a button press, we need
      to check to call gimp_selection_tool_start_edit() to see if the action
      should not be handled by GimpSelectionTool.
      Of course, since we don't necessarily want all child class of
      GimpPolygonSelectTool to support these modifiers (typically we may not
      want these in the Foreground select tool), I set allow_move to FALSE,
      then set it to TRUE only in the GimpFreeSelectTool subclass.
      c9a91b32
    • Jehan's avatar
      app: sync tests with gimp-2-10. · 940dbdf6
      Jehan authored
      Commits e70c08cd from mitch and mine
      (5335f313) clashed as we did the same
      fix nearly the same time on both branches. Let's at least sync so that
      the code is exactly the same (just to avoid potential merge conflicts in
      the future).
      940dbdf6
    • Michael Natterer's avatar
      5160f516
    • Michael Natterer's avatar
      Issue #3512 - feather selection doesn't work at edges of images · aace6b17
      Michael Natterer authored
      Add a "gboolean edge_lock" parameter to GimpChannel::feather() and a
      "Selected areas continue outside the image" toggle to the "Feather
      Selection" dialog, just like they exist for shrink selection and
      border selection. At the end, convert the boolean to the right abyss
      policy for gegl:gaussian-blur.
      aace6b17
    • Michael Natterer's avatar
      Issue #3264 - Wrong colors from opening and exporting non-sRGB tiffs... · 6740c0af
      Michael Natterer authored
      ...and pngs
      
      Fix PNG import and export:
      
      When importing, set the color profile on the image *before* creating
      the layer, so its buffer has the right format with space.
      
      When exporting, create the saving babl format with the layer's space
      so no color conversion happens when reading the layer's pixels.
      6740c0af
    • Piotr Drąg's avatar
      Update Polish translation · 84286afe
      Piotr Drąg authored
      84286afe
  4. 12 Jun, 2019 7 commits
  5. 11 Jun, 2019 10 commits
  6. 10 Jun, 2019 4 commits
    • Ell's avatar
      app: clean up Luminance blend function · 1dd3d7e9
      Ell authored
      ... in particular, don't use a static fish.
      1dd3d7e9
    • Elle Stone's avatar
      65f85e70
    • Ell's avatar
      Issue #3484 - While moving a nested layer group, some area isn't updated · 4a20a75d
      Ell authored
      In gimp_group_layer_translate(), when translating a nested group
      layer, call gimp_drawable_update_all() to update the child-layers'
      original area *before* updating the group's offset, at which point
      the group parent's size is updated, causing subsequent area-updates
      during translation to be clipped to the parent's new bounds,
      preventing the original areas from being properly cleared.
      4a20a75d
    • Ell's avatar
      app: add gimp_drawable_update_all() · 3e5cbb03
      Ell authored
      Add a new GimpDrawable::update_all() virtual function, and a
      corresponding gimp_drawable_update_all() function, which updates
      the full contents of the drawable.  Unlike calling
      `gimp_drawable_update (drawable, 0, 0, -1, -1)`, which updates the
      entire drawable area, gimp_drawable_update_all() only updates the
      area that has actual content.  While the default implentation does
      simply update the entire drawable area, GimpGroupLayer overrides
      this function to recursively update its child layers, rather than
      the its entire area.
      3e5cbb03
  7. 09 Jun, 2019 3 commits
    • Elle Stone's avatar
      app: make luminance blend mode depend on space · 19e74f0e
      Elle Stone authored
      Fixes issue #3451 Space invasion/AnyRGB: Luminance blend mode doesn't work
      
      It might be faster to fetch the RGB luminance and do the computation
      ourselves than looking up the same fish for each processing request, at
      least now we're faster. (commit message and code slightly revised by pippin)
      19e74f0e
    • Piotr Drąg's avatar
      Update Polish translation · 5c5f6018
      Piotr Drąg authored
      5c5f6018
    • Øyvind "pippin" Kolås's avatar
      app: add GeglOperation *operation argument to GimpLayerModeBlendFunc · 8e904683
      Øyvind "pippin" Kolås authored
      Some blend funcs depend on constants from the specifc color space we are
      operating in and needs the space or operation propagated to the worker function
      of the operation as discovered in issue #3451.
      
      This commit propagates the operation, leaving the specific blend functions
      needing it to call gegl_operation_get_source_space or similar without needing
      that overhead for the rest.
      8e904683
  8. 07 Jun, 2019 3 commits
    • Jehan's avatar
      plug-ins: PNG export TRC chosen similarly to TIFF. · 24ed5870
      Jehan authored
      While we tend to default to sRGB for 8-bit max formats (such as JPEG or
      WebP) when no explicitly-assigned profile was set, there is no need to
      do so for PNG too. Indeed since we have the ability to export 16-bit
      PNG, let's consider this is ok to export 16-bit linear data when writing
      GIMP's default linear profile.
      
      Moreover let's follow the profile's (fallback to storage's) TRC also
      when exporting to a specific precision (as chosen manually in the
      dialog), not only when sticking to "Automatic", unless we are downsizing
      a high bit depth work image to 8-bit without a manually assigned profile
      (the only case we forcefully export as sRGB data, hence convert the
      profile if linear storage).
      24ed5870
    • Jehan's avatar
      8cd3f5a8
    • Michael Natterer's avatar
      app: disable overlay scrolling for preferences pages · 9cbc6d03
      Michael Natterer authored
      the overlay was messing with the usability of the page's widgets.
      9cbc6d03