1. 01 Oct, 2021 1 commit
    • Jehan's avatar
      plug-ins: various g_file_get_path() replaced by g_file_peek_path(). · 27dea4f7
      Jehan authored
      As explained in previous commits, the _peek_ call is advantageous
      because:
      - It is less bug-prone as we don't have to handle freeing the string. In
        all the cases I changed, I even spotted at least 2 cases where we were
        leaking a string (in file-mng, `temp_file_name` is never freed; and we
        were also leaking in an error case of gfig).
      - As a consequence of the previous point: simpler code with less lines.
      - In local file cases, the _peek_ variant does not even need to allocate
        an additional string.
      - In other case, if we query several times the path, it is allocated
        once and cached so it stays efficient.
      - When possible, working on the GFile rather than on a path string may
        be more robust. For instance I changed one g_unlink() into a
        g_file_delete(). Actually most reading/writing should be done with the
        GIO API when possible, but I didn't want to change too much code
        logics on this commit.
      27dea4f7
  2. 17 May, 2020 1 commit
    • Jehan's avatar
      app: support saving/exporting with multi-selection. · d3139e0f
      Jehan authored
      This commit just changes our saving API (i.e. the GimpSaveProcedure
      class) to take an array of drawables as argument instead of a single
      drawable.
      
      It actually doesn't matter much for exporting as the whole API seems
      more or less bogus there and all formats plug-ins mostly care only
      whether they will merge/flatten all visible layers (the selected ones
      don't really matter) or if the format supports layers of some sort. It
      may be worth later strengthening a bit this whole logics, and maybe
      allow partial exports for instance.
      
      As for saving, it was not even looking at the passed GimpDrawable either
      and was simply re-querying the active layer anyway.
      Note that I don't implement the multi-selection saving in XCF yet in
      this commit. I only updated the API. The reason is that the current
      commit won't be backportable to gimp-2-10 because it is an API break. On
      the other hand, the code to save multi-selection can still be backported
      even though the save() API wil...
      d3139e0f
  3. 03 Oct, 2019 1 commit
  4. 20 Sep, 2019 1 commit
  5. 11 Sep, 2019 1 commit
  6. 09 Sep, 2019 1 commit
  7. 30 Aug, 2019 1 commit
  8. 24 Aug, 2019 1 commit
  9. 19 Aug, 2019 1 commit
    • Michael Natterer's avatar
      Change the "handles uri" flag of file procedures to "handle remote" · de121374
      Michael Natterer authored
      And always pass URIs to all file procedures, the ones what didn't
      register as "handles remove" will only ever get local file:// URIs.
      
      Change all file plug-ins (also legacy ones) to expect URIs instead
      of filenames, and convert to local paths in the plug-in.
      
      The wire protocol should now be almost 100% clean of non-UTF-8 strings.
      de121374
  10. 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 fun...
      e09e563a
  11. 11 Jul, 2018 1 commit
  12. 20 May, 2018 1 commit
  13. 18 Apr, 2018 1 commit
  14. 21 Aug, 2017 1 commit
    • Michael Natterer's avatar
      Move the new "default_new_layer_mode" APIs to the image... · e16c8a23
      Michael Natterer authored
      ...in both the core and libgimp.
      
      Images now know what the default mode for new layers is:
      
      - NORMAL for empty images
      - NORMAL for images with any non-legacy layer
      - NORMAL_LEGAVY for images with only legacy layers
      
      This changes behavior when layers are created from the UI, but *also*
      when created by plug-ins (yes there is a compat issue here):
      
      - Most (all?) single-layer file importers now create NORMAL layers
      - Screenshot, Webpage etc also create NORMAL layers
      
      Scripts that create images from scratch (logos etc) should not be
      affected because they usually have NORMAL_LEGACY hardcoded.
      
      3rd party plug-ins and scripts will also behave old-style unless they
      get ported to gimp_image_get_default_new_layer_mode().
      e16c8a23
  15. 20 Aug, 2017 1 commit
  16. 26 Feb, 2017 1 commit
  17. 12 Feb, 2017 1 commit
  18. 08 Jan, 2017 1 commit
  19. 25 Jun, 2016 1 commit
  20. 16 Feb, 2016 1 commit
  21. 06 Oct, 2014 1 commit
  22. 23 Jul, 2014 1 commit
  23. 30 Jun, 2014 1 commit
  24. 09 Nov, 2013 1 commit
  25. 23 Jun, 2013 1 commit
    • Michael Natterer's avatar
      Add support for both gamma-corrected and linear for all bit depths · caf73f5f
      Michael Natterer authored
      - Add new enum GimpComponentType which contains u8, u16, u32 etc.
      - Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
      - Add all the needed formats to gimp-babl.c
      - Bump the XCF version to 5 and make sure version 4 with the old
        GimpPrecision enum values is loaded correctly
      
      This change blows up the precision enums in "New Image" and
      Image->Precision so we can test all this stuff. It is undecided what
      format will be user-visible options in 2.10.
      caf73f5f
  26. 06 Jun, 2013 1 commit
  27. 28 Mar, 2013 1 commit
  28. 02 Mar, 2013 1 commit
  29. 17 Feb, 2013 1 commit
  30. 19 Jan, 2013 1 commit
  31. 10 Jan, 2013 3 commits
  32. 16 Nov, 2011 1 commit
  33. 30 Sep, 2011 1 commit
  34. 05 May, 2011 1 commit
  35. 10 Apr, 2011 1 commit
  36. 08 Apr, 2011 1 commit
  37. 06 Sep, 2010 1 commit
  38. 21 Jul, 2009 1 commit