Commit Graph

26 Commits

Author SHA1 Message Date
Ell 9e015f4b7d plug-ins: in file-psd, fix bad sign extension in decode_packbits() 2017-10-09 08:48:03 -04:00
Ell 33255a439b plug-ins: in file-psd, improve PS <-> GIMP layer-mode mapping
Streamline the layer-mode mapping code, to reduce duplication.

Add mappings for the following modes:  Subtract, Divide, Luma/
luminance darken only (Darker Color), Luma/luminance lighten only
(Lighter Color), and Luminance (Luminosity).
2017-08-20 17:15:32 -04:00
Ell dccaa5d5d1 plug-ins: in file-psd, use SRC_OVER and RGB_PERCEPTUAL for all layers
Use SRC_OVER, instead of SRC_ATOP, as the composite mode for all
layers (or use AUTO, when it results in SRC_OVER), to match
Photoshop's behavior.  Use RGB_PERCEPTUAL as the blend and composite
space, instead of AUTO, whose interpretation depends on the specific
layer mode, to match Photoshop's behavior for RGB images.  Use NORMAL
mode, instead of NORMAL_LEGACY, with the above properties, for normal
layers, for consistency with the other layer modes, which don't (and,
indeed, can't) use the legacy modes.
2017-08-09 09:59:39 -04:00
Alexandre Prokoudine 63b041046e Some basics of loading and exporting the pass-through mode of layer groups in PSD.
The plug-in is still missing two essential bits:

1) setting blend mode to a layer group;
2) preserving layer group when exporting to PSD.
2017-08-09 01:31:44 +03:00
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 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
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 eafe1b9be3 plug-ins: some general cleanup in file-psd (no code changes) 2014-02-09 19:38:19 +01:00
Nelson A. de Oliveira ce3db28f5a Fix some memleaks 2011-08-18 13:37:35 -04:00
Nelson A. de Oliveira 7666e5cf36 Fix memory and descriptor leaks 2010-11-12 21:56:17 +01:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Martin Nordholts 76ba090647 plug-ins/file-psd/psd-save.c Add support for reading/writing PSDs with the
* plug-ins/file-psd/psd-save.c
* plug-ins/file-psd/psd-util.c: Add support for reading/writing
PSDs with the Linear Dodge layer mode which is the same as GIMPs
Addition layer mode.

svn path=/trunk/; revision=27407
2008-10-25 16:23:19 +00:00
Sven Neumann 3fa2cbe022 changed to use g_set_error().
2008-08-17  Sven Neumann  <sven@gimp.org>

	* plug-ins/file-psd/psd-util.c (psd_set_error): changed to use
	g_set_error().


svn path=/trunk/; revision=26618
2008-08-17 11:14:13 +00:00
Sven Neumann 1277bb4415 changed to use g_error_new_literal().
2008-08-17  Sven Neumann  <sven@gimp.org>

	* plug-ins/file-psd/psd-util.c (psd_set_error): changed to use
	g_error_new_literal().


svn path=/trunk/; revision=26617
2008-08-17 11:04:04 +00:00
Michael Natterer 3d75c95f95 plug-ins/bmp/* plug-ins/faxg3/* plug-ins/fits/* plug-ins/fli/*
2008-08-11  Michael Natterer  <mitch@gimp.org>

	* plug-ins/bmp/*
	* plug-ins/faxg3/*
	* plug-ins/fits/*
	* plug-ins/fli/*
	* plug-ins/ico/*
	* plug-ins/jpeg/*
	* plug-ins/psd/*
	* plug-ins/sgi/*
	* plug-ins/uri/*
	* plug-ins/xjt/*: removed these...

	* plug-ins/file-bmp/*
	* plug-ins/file-faxg3/*
	* plug-ins/file-fits/*
	* plug-ins/file-fli/*
	* plug-ins/file-ico/*
	* plug-ins/file-jpeg/*
	* plug-ins/file-psd/*
	* plug-ins/file-sgi/*
	* plug-ins/file-uri/*
	* plug-ins/file-xjt/*: and moved them here. Changed executable
	names to "file-foo".

	* plug-ins/Makefile.am: changed accordingly.

	* plug-ins/common/*: rename all file plug-ins to file-foo.c. Get
	rid of the names "poppler" and "postscript" and call them
	"file-pdf" and "file-ps" because the conflict with standard
	autofoo targets is gone.

	* plug-ins/common/plugin-defs.pl: changed accordingly.

	* plug-ins/common/mkgen.pl: make sure cflags variables are named
	"PLUG_IN_NAME_CFLAGS" and not "PLUG-IN-NAME_CFLAGS"

	* plug-ins/common/Makefile.am: regenerated.

	* configure.in: change folders and variable names to match above
	changes.


svn path=/trunk/; revision=26494
2008-08-11 10:06:13 +00:00