Commit Graph

111 Commits

Author SHA1 Message Date
Ell 03756d0980 app: rename "Color (HSV) (legacy)" mode to "Color (HSL) (legacy)"
The color-space qualification is, in fact, a 2.9 thing, so there's no
historic reason to keep the wrong name for the legacy mode.
2017-03-16 06:23:30 -04:00
Ell b22c09e7b7 app: implement color-erase mode as a GimpOperationLayerMode blendfun
... and get rid of the dedicated op.  This gives us support for all
the blend/composite options for this mode.

Rename COLOR_ERASE to COLOR_ERASE_LEGACY, with perceptual blending/
compositing and immutable everything, and add a new COLOR_ERASE
mode, defaulting to linear blending/compositing, with mutable
everything.  Modify affected code.
2017-03-08 14:13:51 -05:00
Michael Natterer 3cf423f0cd *: rename NORMAL to NORMAL_LEGACY and NORMAL_LINEAR to NORMAL
and make NORMAL_LEGACY immutable.
2017-02-26 16:26:34 +01:00
Michael Natterer 63f1ec4101 app, libgimp, plug-ins: remove the _LINEAR layer mode variants
Missing: PDB API to set the various sub-modes we now have for layer modes.
2017-02-19 23:15:59 +01:00
Juan Palacios 9b636ff798 Bug 778571 - Add support to import/export layer color tags from/to psd files
Except GIMP's "brown" tag which is not supported by PS.
2017-02-13 21:30:26 +01:00
Alexandre Prokoudine b3e4588a5f psd: add support for loading and exporting Hard Mix layer mode
Also remove warning from the Vivid Light loader, we are good now.
2017-02-05 16:36:41 +03:00
Alexandre Prokoudine 832c79e8d8 Activate exporting more layer modes from XCF to PSD 2017-02-04 18:43:34 +03:00
Alexandre Prokoudine 2bce09ff9b Add Linear Burn to PSD exporting, update the list of XCF layer modes 2017-02-04 18:03:59 +03:00
Alexandre Prokoudine 023cdd159e Update XCF to PSD layer mode mappings 2017-02-04 17:55:18 +03:00
Alexandre Prokoudine 0584fc0e45 psd: add stubs for Darker Color and Lighter Color layer modes 2017-02-04 17:28:13 +03:00
Alexandre Prokoudine b471c90aee Update PSD to GIMP layer mode mappings 2017-02-04 17:22:07 +03:00
Michael Natterer 393ce1d53b plug-ins: use the new composite mode API in file-psd
No clue if this is right.
2017-02-02 00:40:37 +01:00
Michael Natterer 152adbb1bd Rename GIMP_LAYER_MODE_FOO_BROKEN to GIMP_LAYER_MODE_FOO_LEGACY
"Broken" sounds like it needs fixing, but it's legacy compat stuff
that will have to stay for all eternity.
2017-01-09 01:27:20 +01:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Hartmut Kuhse 66bc98d299 Revert "New GimpMetadata as subclass of GExiv2Metadata"
This reverts commit 3ab08c8bfd.
2017-01-03 19:36:22 +01:00
Hartmut Kuhse 3ab08c8bfd New GimpMetadata as subclass of GExiv2Metadata 2017-01-03 19:26:35 +01:00
Jehan e83ed61178 plug-ins: cleaning out some indentation tabs. 2016-11-03 23:02:19 +01:00
Matthias Junker-Petschick 3139cb9305 Bug 771558 - PSD files with a layer additional data length...
...not divisible by 4 are incorrectly reported as corrupt

file-psd: Do not round up the extra data length field when reading
layer info.

Fixes the PSD layer extra information handling in read_layer_info() by
not rounding up the data length field to a multiple of 4.

Layers can contain extra data, which is encoded at the end of layer
records. The length of this data should always be stored rounded up to
an even byte count. When loading a PSD file, it can be expected that
this value is already rounded up and this operation should not be
necessary. If an uneven byte count is encountered, a warning is
emitted but the loading process is not aborted.
2016-10-09 22:29:51 +02:00
Richard Kreckel dd9b0fc55b Bug 768044 - Fix many typos
This fixes many typos in comments and one in a user-visible string (msgid
"center abscisse" changed to "center abscissa" in affected po files. too).
2016-06-26 00:35:24 +02:00
Jehan 8a37c928eb app, plug-ins, libgimp*: clean out all remaining trailing spaces/tabs.
Rather than just discovering them by chance, a simple grep and some
search and replace are much more efficient! :-)
Cleaning only done on C and automake files.
2016-06-02 02:04:26 +02:00
Jehan ec27b539ea plug-ins: various s/save/export/ replacement on visible strings. 2016-02-16 02:35:43 +01:00
Massimo Valentini 32469d53b7 Bug 684295: wrong layer group structure in gimp 2.8.2...
... (read PSD file from PS CS3)

use a position of 0 when inserting normal layers
as they're always inserted on top of their group

-1 means inside the group when the active drawable is
a group or above it when it's not. This used to work
before layer groups or in simple cases.
2016-01-04 12:55:58 +01:00
Massimo Valentini e79632728d Bug 760029: PSD loader fails to load files with...
... adjustment or fill layers

the length of the compressed channel data was truncated
for the wrong type used in read_channel_data signature
2016-01-04 12:55:58 +01:00
Michael Natterer 67597f42ad Bug 754727 - gimp 2.9.1 git compilation fails in file-psd
Fix some glitches in patches I recently applied blindly :)
2015-09-08 18:54:02 +02:00
Julien Nabet 5a2757c6ec Bug 753986 - manage layer resource block lnsr
Layer name source (id on 4 characters encoded in MacRoman).
psd from PS>5 have "luni" (Layer Unicode)

See https://bugzilla.gnome.org/show_bug.cgi?id=753986#c4 for more details

Janitorial on lyvr:
move IFDBG at the beginning of the function
+change the content of it
2015-09-06 16:57:11 +02:00
Julien Nabet 8fb017342c Bug 753980 - manage layer resource block lyvr
Layer version appeared in PS7
Just warns if version is < 70 but nothing more
2015-08-23 13:51:05 +02:00
Michael Natterer 01df24c47e plug-ins: remove obsolete #defines from file-psd/psd.h 2015-08-20 11:26:59 +02:00
Michael Natterer 1d37c67879 plug-ins: use the GimpColorProfile API instead of the "icc-profile" parasite 2015-08-20 11:15:26 +02:00
ShadowKyogre 925ee21750 Bug 750594 - Colors in PSD files are far lighter on import and far darker on export
GIMP's PSD plugin was assuming that colors in PSD files are linearly interpolated
on both export and import. This commit fixes the issue by doing the following:

- when importing, assume the colors are gamma interpolated in the entire image
- when importing and exporting, treat the colors in each layer as gamma interpolated
- when importing and exporting, treat indexed colors as actually indexed colors
- when exporting, treat the interpolation in the channels and masks as linearly interpolated
2015-06-24 19:02:17 +02:00
Massimo Valentini 6138b58f14 file-psd: use correct size for high bit depth extra channels
it was missing a '* bps' in the size of data passed to GEGL
and the lower half of an extra-channel from a 16bit psd
appeared as garbage in GIMP
2015-06-19 18:58:39 +02:00
Massimo Valentini b07cf7fbee file-psd: improve high bit depth and compression support
see:
Bug 750729 - Importing *.PSDs with greater than
 8-bit depth lose their masks and appear funny
2015-06-13 18:33:00 +02:00
Michael Natterer 34c788d34e plug-ins: fix indentation of calls to read_channel_data() in psd-load.c 2015-05-01 16:36:51 -04:00
Michael Natterer c6ac3550d3 plug-ins: replace ">> 3" by "/ 8" in psd-load.c 2015-05-01 16:31:21 -04:00
Michael Natterer cf4cc504cf plug-ins: set G_LOG_DOMAIN in file-psd so it's possible to see the debug output 2015-05-01 16:19:52 -04:00
Michael Natterer bc4cf9918f Bug 673501 - Issue with Overlay
GIMP's OVERLAY mode was identical to SOFTLIGHT. This commit fixes the
issue and introduces a NEW_OVERLAY mode and enum value.

- change gimp:overlay-mode to be a real (svg-ish) overlay mode
- when compositing, map OVERLAY to gimp:softlight-mode
- when compisiting, map NEW_OVERLAY to gimp:overlay-mode
- bump the XCF version when NEW_OVERLAY is used
- map OVERLAY to SOFTLIGHT when loading and saving XCF
- map OVERLAY to softlight in all PDB setters
- map OVERLAY to softlight when deserializing a GimpContext
- change all paint mode menus to show an entry for NEW_OVERLAY
  instead of OVERLAY
- change PSP, PSD and OpenRaster to use NEW_OVERLAY

These changes should (redundantly) make sure that no OVERLAY enum
value is used in the core any longer because it gets mapped to
SOFTLIGHT at all entry points, with the downside of introducing a
setter/getter asymmetry when OVERLAY was set in a PDB api.
2015-04-29 13:32:58 -04:00
Michael Natterer 48618b88dc plug-ins: update file-psd/.gitignore 2015-04-26 15:50:13 -04:00
Michael Natterer 37c8e5602d plug-ins: merge file-psd-load and file-psd-save into one binary file-psd
which share the psd.c file for query() and run(), instead of having
save's stuff commented out in psd.c, and having it duplicated in
psd-save.c for the separate binary.
2015-04-26 15:37:31 -04:00
Michael Natterer 68ba2037c9 Bug 748488 - Unable to export to *.psd
Fix multiple small but crashing bugs:

- call gegl_init()
- gegl_buffer_get()'s scale must be 1.0 not 0
- don't unref the metadata object twice
2015-04-26 15:06:16 -04:00
Michael Natterer 3d3f1d6855 Bug 748487 - Thumbnails sometimes don't render correctly with *.PSD files
Using the right Babl format (JPEG previews don't have an alpha
channel), and fixing the main scanline loading loop (which was totally
busted) make the PSD previews look like images.
2015-04-26 13:31:01 -04:00
Massimo Valentini b42e764d9c Bug 698859: PSD import filter: opening a PSD file causes...
...file-psd-load segfault.

Fix loading of PSDs where the number of "end group" markers doesn't
match the number of "start group" markers, which seems to be what is
saved by Photoshop in some cases/versions/whatever.
2015-04-25 23:26:30 -04:00
Michael Natterer 9c5ef53c66 plug-ins: convert tabs to spaces in file-psd/psd-load.c 2015-04-25 23:20:00 -04:00
Michael Natterer 7c4f3f02c7 Bug 747156 - Gimp Development version crashes on processing masks from psds
Fix the other pixel format issue in this bug: split up
get_pixel_format() into 3 functions get_layer,channel,mask_format() so
we use the right one for the right drawable type, get_layer_format()
has an "alpha" parameter that is taken from the loaded layer instead
of from the PSDimage struct.
2015-04-25 23:02:54 -04:00
Michael Natterer 0d7d96d09f Bug 747156 - Gimp Development version crashes on processing masks from psds
Don't use the image's layer format to load layer mask and channels,
use a grayscale format instead.
2015-04-19 00:16:57 +02:00
Michael Natterer 3cda160fc1 plug-ins: the "icc-profile" parasite must be undoable 2015-04-18 23:57:10 +02:00
Simon Budig 7928be2255 fix a few potential use-before-check errors
Spotted by Andrey Karpov using static code analysis:
   http://www.viva64.com/en/b/0273/
2014-08-16 00:59:19 +02:00
Simon Budig 218b78241c fix errors in the psd loader code.
triggered by Andrey Karpov finding a stupid if-elseif-elseif-... sequence
using static code analysis:
   http://www.viva64.com/en/b/0273/
2014-08-16 00:37:14 +02:00
Michael Natterer f28878b6d3 plug-ins: start the progress before opening files for loading/saving
so the user gets feedback as early as possible.
2014-07-23 21:37:13 +02:00
Michael Natterer b5530e9e3d Use the new GeglAccessMode enum instead of the old values 2014-07-02 02:00:35 +02:00
Michael Natterer 3a4fedea7c libgimp: make gimp_image_metadata_save_prepare() suggest GimpMetadataSaveFlags
Return flags based on what metadata is actually present in the image.
Returning of a suggested value for GIMP_METADATA_SAVE_THUMBNAIL needs
support from gimp_image_metadata_load_prepare() and is still missing.

Port all plug-ins to use the new API, the suggested values are however
overridden by parasites and whatever special code was devised for the
individual plug-ins. This needs to be fixed.
2014-06-05 02:07:13 +02:00
Michael Natterer 425748dab0 libgimpbase, *: rename GimpFillType values: GIMP_FOO_FILL -> GIMP_FILL_FOO
Change all users accordingly and add compat enum values and compat
constants to script-fu and pygimp.
2014-06-03 01:11:32 +02:00