1. 29 Sep, 2022 1 commit
    • Alx Sa's avatar
      plug-ins: Export PSD as CMYK file · 4ddb71c8
      Alx Sa authored
      Adds an option to export as CMYK (mutually exclusive with the existing
      Duotone export option). Header information (mode and number of channels)
      are set, and the data itself is converted via Babl.
      Layer channels are also hardcoded to 4, since GIMP currently doesn't
      support CMYK channels.
  2. 24 Aug, 2022 2 commits
  3. 19 Aug, 2022 1 commit
    • Alx Sa's avatar
      plug-ins: Enable export of original Duotone data · a3fb3ca1
      Alx Sa authored and Jacob Boerema's avatar Jacob Boerema committed
      Optionally includes the previously saved 
      Duotone color space data on PSD export.
      New load dialogue alerts user if duotone data was imported.
      New export dialogue appears if the image is still grayscale and
      the parasite exists.
      If selected, the mode is set to PSD_DUOTONE in the header and
      the original duotone data is written in the color space section.
  4. 14 Dec, 2021 1 commit
    • Jacob Boerema's avatar
      plug-ins: add extra layer groups when loading PSD images with clipping layers · e51d5d48
      Jacob Boerema authored
      Together with the previous commit this mostly fixes #5438.
      PhotoShop handles clipping layers in a different way than GIMP. The only
      way to have it look the same is by adding extra layer groups.
      PSD layers that have clipping set, combined with the first non clipping
      layer below it are grouped together in a new layer group.
      Doing this results in the same image as the PSD merged image unless there
      are other PSD elements in play that we don't handle yet.
      See e.g. the NSFW image in the mentioned issue where the purple hair color
      is a little darker than the merged image.
  5. 11 Nov, 2021 2 commits
    • Jacob Boerema's avatar
      plug-ins: fix export of multi layer image as psd · 3425212a
      Jacob Boerema authored
      Due to starting with the highest index we were referencing layer data
      out of bounds.
      We need to decrease i with 1 before using it as index into the channel data
      for the correct layer.
      This caused a crash when exporting multi layer images.
    • Jacob Boerema's avatar
      plug-ins: Use the same define for debugging psd-load and psd-save · 737cc09e
      Jacob Boerema authored
      psd-save was using a separate define for enabling debugging. Let's just
      use the one define from psd.h.
      IFDBG -> IFDBG(1)
      IF_DEEP_DBG -> IFDBG(3)
      Besides changing the define in psd-save we also change all the printf
      statements used for debug output to g_debug. This allows us to view/hide
      the debug output.
  6. 01 Oct, 2021 2 commits
    • Jehan's avatar
      plug-ins: clean up warnings from psd-save. · f1317807
      Jehan authored
      These warnings only happens on debug output, so it's not huge bugs, yet
      it's always better not to have warnings at build time.
      Most are printf format type warnings, and one is because of uncomplete
      switch() cases.
    • Jehan's avatar
      plug-ins: more replacement of g_file_get_path() to g_file_peek_path(). · 4ae3687c
      Jehan authored
      While doing this cleanup, I found at least several other string leaks
      in: file-compressor, file-gegl, file-pdf-save, file-raw-data, file-xwd,
      jpeg-load, psd-save…
      So it's quite worth it!
      Note: in file-pdf-save, there is a global variable file_name which seems
      to be happily leaked without caring (didn't look in details, but looks
      so). I didn't fix this one which will require a bit more in-depth logics
  7. 24 May, 2021 1 commit
  8. 11 May, 2021 1 commit
    • Jacob Boerema's avatar
      plug-ins: fix #5944 Unable to open XCF converted PSD files · 38c0344f
      Jacob Boerema authored
      in Gimp and Photoshop- "Too many channels in layer: 4907"
      To be better able to handle 64 bit offsets we switch to
      using GInputStream/GOutputStream and its related
      functions instead of using FILE functions like fseek.
      In addition we changed several offsets and sizes to
      64 bit instead of 32 bit to correctly handle large
      image sizes and offsets.
      I should probably have split this out in two parts
      (the move to GInput/OutputStream, and the
      changing to 64 bit variables) but don't feel like
      it's worth the trouble at this point.
  9. 04 May, 2021 1 commit
  10. 06 Apr, 2021 1 commit
    • Jehan's avatar
      app, libgimp, pdb, plug-ins: more functions moved to get|set(). · ca8bc2bc
      Jehan authored
      The gimp_drawable_type() is an issue though as gimp_drawable_get_type()
      is already defined as a common GObject API.
      Though I'm actually wondering if GimpImageType is well called. Rather
      than Type, shouldn't we go with ColorModel?
      sed -i 's/\<gimp_drawable_bpp\>/gimp_drawable_get_bpp/g' "$@"
      sed -i 's/\<gimp_drawable_width\>/gimp_drawable_get_width/g' "$@"
      sed -i 's/\<gimp_drawable_height\>/gimp_drawable_get_height/g' "$@"
      sed -i 's/\<gimp_drawable_offsets\>/gimp_drawable_get_offsets/g' "$@"
  11. 05 Apr, 2021 1 commit
    • Jehan's avatar
      app, libgimp, pdb, plug-ins: update some more functions to get|set(). · fa161527
      Jehan authored
      Sorry plug-in developers, more porting work! But really this seems like
      the right thing to do in order not to get stuck with inconsistent naming
      for many more years to come.
  12. 24 Feb, 2021 1 commit
    • Jehan's avatar
      plug-ins: multi-layer support in PSD load/export. · 0f0e63ff
      Jehan authored
      - Store the Layer ID (lyid) block. Use GIMP's layer tattoo as a PSD
        layer ID, hence mirroring PSD load processing (we were already reading
        this block into our layer tattoos but always exporting with no ID).
      - Add support for the Layer Selection ID(s) block (0x042D) both on
        import and export in order to store and restore the multi-layer
        We were previously using the Layer state information block (0x0400) to
        store the active layer, but it doesn't seem to be usable for multiple
        layer selection. Actually it is even doubtful if this was working fine
        even for single layer selection but I can't be sure (I could only test
        in non-Photoshop software available to me). So the new logics is:
        * If more than 1 layer is selected, store only the Layer Selection
          ID(s) block.
        * If exactly 1 layer is selected, store both the Layer Selection ID(s)
          and Layer state information blocks.
        * Otherwise (no layers selected) do not store any of these blocks.
  13. 26 Apr, 2020 4 commits
  14. 08 Apr, 2020 1 commit
    • Ell's avatar
      plug-ins: add support for exporting 16-bit PSDs · 9099f317
      Ell authored
      In file-psd, add support for exporting high bit-depth images.  This
      is currently limited to 16-bit images, since 32-bit images seem to
      have a different structure (our loading code can successfully load
      32-bit images exported by the plug-in, but not actual 32-bit PSD
      files saved in Photoshop.)  Higher bit-depth images are saved as
      16-bit for now.
      Note also that when saving a linear image with a built-in linear
      profile the result is wrong (the image is exported with a linear-
      TRC profile, but the data is perceptual), but this is a general
      problem we have to fix, not restricted to the PSD plug-in.
  15. 11 Sep, 2019 1 commit
  16. 27 Aug, 2019 1 commit
    • Michael Natterer's avatar
      libgimp: again, redo all APIs returning list of images, items, children · 0b3e02be
      Michael Natterer authored
      We now have both variants, one returning a GList, and another
      returning an array. Turns out that while a list is often nicer,
      sometimes a random-access array really keeps the code much simpler.
      Adapt all plug-ins, and clean up a bit (like use g_list_reverse() once
      instead of iterating the list reversed).
  17. 22 Aug, 2019 1 commit
  18. 03 Dec, 2018 1 commit
  19. 02 Dec, 2018 1 commit
  20. 11 Sep, 2018 1 commit
  21. 11 Jul, 2018 1 commit
  22. 12 Jun, 2018 1 commit
  23. 25 Apr, 2018 1 commit
  24. 05 Feb, 2018 1 commit
  25. 14 Jan, 2018 1 commit
  26. 11 Nov, 2017 1 commit
    • Ell's avatar
      Bug 789981 - Wrong layer structure in PSDs with deeply nested layer groups · 54ec9373
      Ell authored
      Photoshop CS5 adds support for layer groups whose nesting depth is
      above 5.  The end markers of these groups use an undocumented
      "lsdk" key for their section dividers, rather than the usual
      "lsct".  This caused the PSD plugin to treat them as regular
      layers, resulting in wrong layer-tree structure.
      Add support for "lsdk" section dividers upon loading, and also
      generate "lsdk" section dividers upon saving sufficiently-deep
  27. 22 Oct, 2017 1 commit
  28. 09 Oct, 2017 1 commit
    • Ell's avatar
      app: in file-psd, make layer-group saving more Photoshop-like · adff950d
      Ell authored
      Tweak the layer group saving code so that the saved PSDs match
      Photoshop-produced PSDs a bit more closely.  For the most part, it
      doesn't seem to matter much, but it does somewhat improve
      compatibility with other programs that read PSDs.
  29. 04 Sep, 2017 2 commits
    • Ell's avatar
      Bug 592533 - Mask positions move to top-left when saving as PSD · eb2741ed
      Ell authored
      And: Bug 593251 - Mask positions may be incorrect when opening a PSD
      The position-relative flag of layer masks doesn't specify how the
      mask position is represented in the PSD -- it's always absolute --
      but rather whether the layer and the mask are linked or unlinked.
      Since masks are always linked to their layers in GIMP, just ignore
      this flag (and, when saving, clear the flag so that the mask is
      linked to layer when loaded in PS.)
    • Ell's avatar
      plug-ins: in file-psd, improve layer opacity loading/saving · dc89e380
      Ell authored
      Avoid losing precision and improve rounding when rescaling layer
      opacity during loading and saving, respectively.
  30. 20 Aug, 2017 2 commits
  31. 08 Aug, 2017 1 commit
  32. 16 Mar, 2017 1 commit