Commit Graph

118 Commits

Author SHA1 Message Date
Elle Stone aaed8a6eb9 app: Bug 753163 - Add blend mode "RGB Luminance"
This adds a blend mode similar to CIE Luminance - but that does not alter
saturation.
2017-02-20 13:54:37 +01:00
Michael Natterer 1dd2c52ed3 app, pdb, libgimp: add PDB API for layer blend space and compositing space 2017-02-20 01:17:07 +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
Ell 8f4700b839 app: add "hard mix" blend mode
Similar to the Photoshop mode of the same name.  Assigns
either 0 or 1 to each of the channels, depending on whether the
sum of source and destination channel values is less than, or
greater than (or equals to), one, respectively.

This is equivalent to inverting the source, and using it to perform
per-pixel, per-channel threshold against the destination, which is
useful for various effects.
2017-02-04 21:30:56 -05:00
Michael Natterer 2a96d598c3 app: add internal and PDB API and UI to control a layer's composite mode
Largely based on a patch by Ell, with the enum type renamed and
various small changes. Adds another axis of configurability to the
existing layer mode madness, and is WIP too.
2017-02-02 00:38:25 +01:00
Michael Natterer 9397aff96f app: add GIMP_LAYER_MODE_LUMA_DARKEN_ONLY and _LUMA_DARKEN_ONLY
which are perceptual versions of the new LUMINANCE_DARKEN_ONLY and
LUMINANCE_LIGHTEN_ONLY modes. Add the new modes to the UI.
2017-01-30 22:07:51 +01:00
Michael Natterer 69b7cb02dc libgimp, tools: commit regenerated enums files 2017-01-30 12:21:03 +01:00
Michael Natterer 5389e8e417 app, libgimp: rename GIMP_LAYER_MODE_NORMAL to NORMAL_LINEAR
and NORMAL_NON_LINEAR to NORMAL, so it's consistent with all other
modes.
2017-01-28 21:38:52 +01:00
Michael Natterer 31241a984e app, libgimp: remove GIMP_LAYER_MODE_DARKEN,LIGHTEN_ONLY_LINEAR
There is no _LINEAR variant, the modes always do the same.
2017-01-25 22:08:06 +01:00
Øyvind Kolås d836d94114 app: implement non-legacy blend modes in GimpOperationLayerMode
For operations needing to override default behavior sub-classes should still be
used.

This commit also enables pinligh, vividlight and linearlight blend mode modes
2017-01-23 23:47:56 +01:00
Michael Natterer 5eb0fa816a app, libgimp: add LINEAR variants of more layer modes
for completeness/consistency, even if they don't make much sense for
prectical use.
2017-01-15 16:02:10 +01:00
Michael Natterer 50669fe6d4 app, libgimp: rename BEHIND enum values to be consistent with others
Also update gimplayermodefunctions.c which I forgot before.
2017-01-15 00:01:09 +01:00
Michael Natterer 6bf9e47ba8 app, libgimp: add linear variants of most layer modes
and reorder gimp_gegl_mode_node_set_mode() and friends.
2017-01-14 22:56:54 +01:00
Michael Natterer 5951d39938 app, libgimp: reorder enum GimpLayerMode
so LEGACY and new modes have the same order, if possible.
2017-01-14 21:52:54 +01:00
Øyvind Kolås 4df1af2534 app: add linear variant of behind mode 2017-01-12 14:27:15 +01:00
Øyvind Kolås ec1f7a94e3 app: split legacy out of grain extract and merge 2017-01-11 04:40:26 +01:00
Øyvind Kolås 784a8ee224 app: split legacy out of burn and divide 2017-01-11 03:17:53 +01:00
Øyvind Kolås 71030f49e9 app: duplicate hsv layer modes, and fix alpha handling 2017-01-10 21:48:03 +01:00
Øyvind Kolås c3e5e30450 app: split legacy lighten only and darken only ops 2017-01-10 11:18:52 +01:00
Øyvind Kolås 5a7fd54d34 app: split addition and subract in legacy and new 2017-01-10 01:40:14 +01:00
Øyvind Kolås 3a50cdcd4f app: split screen op in legacy and new 2017-01-09 23:19:29 +01:00
Øyvind Kolås 076621dd75 app: split dodge op in legacy and new 2017-01-09 20:10:17 +01:00
Øyvind Kolås c2583faa5a app: add new multiply op 2017-01-09 20:10:04 +01:00
Øyvind Kolås 735887286a app: do not let pixel encoding determine layer modes
See bug #757485 - woth noting that this also enables linear and thus correct
compositing when using 8bpc perceptual gamma as the layer storage format.
2017-01-09 20:09:50 +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
Thomas Manni f4cb2dd881 Bug 109161 - Improve Histogram with Luminance Channel
Add a luminance channel to GimpHistogram
2016-04-18 19:35:06 +01:00
Thomas Manni a7b84ded8e Bug 325564 - Use CIE LCH instead of HSL for layer mode Color
Add Hue, Chroma, Color and Lightness layer modes in LCH color space.
2015-06-02 01:37:26 +02: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 6c7fae9e11 app, libgimp*, pdb: move more enums from app/core to libgimpbase 2014-05-14 00:06:01 +02:00
Michael Natterer f636b4ad34 app, libgimpbase: move lots of enums from app/core to libgimpbase
It makes little sense to keep them in one header and parse them with a
pile of perl, just to generate them in another header. Simply keep
them in a place everybody depends on.
2014-05-13 00:27:29 +02:00
Michael Natterer a4223766f2 all,libgimp*: move GimpConvolveType and GimpInkBlobType to libgimpbase
and make GimpConvolveType's values sane.
2014-04-29 22:44:58 +02:00
Michael Natterer 2ff414d799 app,libgimp,pdb: remove enum GimpConvolutionType from the public API
It was exported accidentially and never used for anything.
2014-04-27 23:05:12 +02:00
Michael Natterer e7ff0589cb app: shuffle precision enum values around to make room for U64
and add code to handle the old values from XCF files < version 7.
2014-03-09 01:46:08 +01:00
Michael Natterer 3c918353fb app: add double precision support, for completeness
and because it makes us look utterly cool.
2014-03-09 00:43:55 +01:00
Michael Natterer caf73f5f35 Add support for both gamma-corrected and linear for all bit depths
- 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.
2013-06-23 16:51:24 +02:00
Michael Natterer 1badcb7ce9 app: add GIMP_PRECISION_U32 and all its formats 2012-05-02 17:51:19 +02:00
Michael Natterer 2e7944cad0 app: add GIMP_PRECISION_HALF for 16 bit floating point
and use babl_format_get_palette() to simplify some code.
2012-05-02 17:51:18 +02:00
Michael Natterer 3e4edc1aea pdb/libgimp: export enum GimpPrecision and gimp-image-convert-precision 2012-05-02 17:51:17 +02:00
Michael Natterer b952f80be0 Bug 658477 - add PDB support for more paint and ink options
Apply heavily modified patch from Es Swartz which adds PDB API for
brush size, angle and aspect ratio, as well as a full interface for
ink. Changed to patch to add all procedures to the "context" group
instead of creating new PDB groups, properly use the new
GimpPDBContext APIs for paint options, and did some general cleanup.
(Warning, completely untested).
2012-03-01 12:58:26 +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
Simon Budig a8593d8141 Oops. Need to specify both pdb-skip and skip.
2006-10-25  Simon Budig  <simon@gimp.org>

	* app/vectors/vectors-enums.h: Oops. Need to specify both
	pdb-skip and skip.

	* libgimp/gimp.def
	* libgimpconfig/gimpconfig.def
	* libgimpmath/gimpmath.def
	* libgimpthumb/gimpthumb.def
	* libgimpwidgets/gimpwidgets.def: .def-file maintenance. Hope my
	changes are correct...

	With the help from
	   nm .libs/libgimpfoo-2.0.so |\
	   sed -ne "s/.* T \([a-zA-Z0-9][a-zA-Z0-9_]*\)/\t\1/p" |\
	   (echo EXPORTS ; LC_ALL=C sort )

	* libgimpwidgets/gimppageselector.c: marked stretch_frame_image()
	as static.

	* libgimp/gimpenums.c.tail
	* libgimp/gimpenums.h
	* tools/pdbgen/enums.pl: regenerated.

	* devel-docs/libgimp/tmpl/gimpfontselectbutton.sgml: this changed
	again. WTF?
2006-10-25 16:55:20 +00:00
Simon Budig ab4d8b037c extended gimp_vectors_import() and friends with a parameter for returning
2006-10-25  Simon Budig  <simon@gimp.org>

        * app/vectors/gimpvectors-import.[ch]: extended gimp_vectors_import()
        and friends with a parameter for returning the newly generated vectors.

        * app/actions/edit-commands.c
        * app/actions/vectors-commands.c
        * app/display/gimpdisplayshell-dnd.c
        * app/widgets/gimpvectorstreeview.c: Changed accordingly.

        * app/vectors/vectors-enums.h: moved the GimpVectorsStrokeType to...
        * libgimpbase/gimpbaseenums.h: ... this file.

        * app/vectors/Makefile.am: Changed accordingly
        * app/vectors/vectors-enums.c: removed accordingly.

        * tools/pdbgen/pdb/vectors.pdb: new functions
        gimp_vectors_new_from_file() and gimp_vectors_new_from_string().

        * tools/pdbgen/pdb/paths.pdb: deprecated the previous functions.

        * app/pdb/internal_procs.c
        * app/pdb/paths_cmds.c
        * app/pdb/vectors_cmds.c
        * app/vectors/vectors-enums.c
        * libgimp/gimpenums.h
        * tools/pdbgen/enums.pl
        * libgimp/gimppaths_pdb.[ch]
        * libgimp/gimpvectors_pdb.[ch]
        * libgimpbase/gimpbaseenums.c
        * devel-docs/libgimp/tmpl/gimpfontselectbutton.sgml
        * devel-docs/libgimp/tmpl/gimptools.sgml: regenerated.
2006-10-25 15:14:03 +00:00
Simon Budig f57321511e app/vectors/Makefile.am app/vectors/vectors-enums.h added new file for the
2006-10-24  Simon Budig  <simon@gimp.org>

	* app/vectors/Makefile.am
	* app/vectors/vectors-enums.h
	* app/vectors/vectors-types.h: added new file for the vectors enums,
	adjusted Makefile.am for the generation of vectors-enums.c

	* tools/pdbgen/Makefile.am
	* tools/pdbgen/pdb/vectors.pdb: Added implementation for
	gimp-vectors-stroke-get-points which returns the control points for
	the stroke.
	Renamed gimp-vectors-stroke-remove to gimp-vectors-remove-stroke.

	ATTENTION: this breaks scripts using this function, a simple name
	change is enough to make it work again.
	Also please note that yosh reordered the return values of
	gimp-vectors-stroke-interpolate, so your scripts need adjustment
	there as well.

        * tools/pdbgen/pdb/paths.pdb: deprecate gimp-path-get-points. Yay!

	* libgimp/gimp.def: added new symbol

	* plug-ins/pygimp/pygimp-vectors.c: reflect name change of
	gimp_vectors_remove_stroke ().

	* app/vectors/vectors-enums.c
	* app/pdb/internal_procs.c
	* app/pdb/paths_cmds.c
	* app/pdb/vectors_cmds.c
	* devel-docs/libgimp/tmpl/gimpvectors.sgml
	* libgimp/gimpenums.c.tail
	* libgimp/gimpenums.h
	* libgimp/gimppaths_pdb.[ch]
	* libgimp/gimpvectors_pdb.[ch]
	* tools/pdbgen/enums.pl: regenerated.
2006-10-24 14:23:29 +00:00
Sven Neumann 0b5a30d13c app/core/core-enums.h tools/pdbgen/pdb/edit.pdb applied patch from David
2006-08-15  Sven Neumann  <sven@gimp.org>

	* app/core/core-enums.h
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/selection_tools.pdb: applied patch from David
	Gowers that adds extended PDB interface for gimp-edit-bucket-fill,
	gimp-by-color-select and gimp-fuzzy-select. Fixes bugs #348291 and
	#347499.

	* app/pdb/edit_cmds.c
	* app/pdb/internal_procs.c
	* app/pdb/selection_tools_cmds.c
	* libgimp/gimpedit_pdb.[ch]
	* libgimp/gimpenums.c.tail
	* libgimp/gimpenums.h
	* libgimp/gimpselectiontools_pdb.[ch]
	* tools/pdbgen/enums.pl: regenerated.

	* libgimp/gimp.def: updated.
2006-08-15 16:20:46 +00:00
Sven Neumann 95f9330dbb app/plug-in/plug-in-enums.h moved GimpRunMode enum to libgimpbase.
2006-04-06  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-enums.h
	* libgimpbase/gimpbaseenums.h: moved GimpRunMode enum to libgimpbase.

	* app/plug-in/plug-in-enums.c
	* libgimp/gimpenums.h
	* libgimpbase/gimpbaseenums.c
	* tools/pdbgen/enums.pl: regenerated.

	* libgimpbase/gimpbase.def: updated.
2006-04-06 10:16:39 +00:00
Michael Natterer 2368a6a380 export GimpBrushGeneratedShape to the PDB.
2006-03-22  Michael Natterer  <mitch@gimp.org>

	* app/core/core-enums.h: export GimpBrushGeneratedShape to the PDB.

	* tools/pdbgen/pdb/brush.pdb: use it instead of int32.

	* libgimp/gimp.def: add gimp_brush_generated_shape_get_type().

	* tools/pdbgen/pdb/brush_select.pdb
	* tools/pdbgen/pdb/brushes.pdb
	* tools/pdbgen/pdb/display.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/font_select.pdb
	* tools/pdbgen/pdb/fonts.pdb
	* tools/pdbgen/pdb/gimprc.pdb
	* tools/pdbgen/pdb/gradients.pdb
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/misc.pdb
	* tools/pdbgen/pdb/paint_tools.pdb
	* tools/pdbgen/pdb/palette.pdb
	* tools/pdbgen/pdb/palette_select.pdb
	* tools/pdbgen/pdb/palettes.pdb
	* tools/pdbgen/pdb/paths.pdb
	* tools/pdbgen/pdb/pattern_select.pdb
	* tools/pdbgen/pdb/patterns.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/text_tool.pdb: more perl/C code separation,
	removed some more utility functions, cleanup.

	* app/pdb/brush_cmds.c
	* app/pdb/brushes_cmds.c
	* app/pdb/display_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/fonts_cmds.c
	* app/pdb/gimprc_cmds.c
	* app/pdb/gradients_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/palettes_cmds.c
	* app/pdb/paths_cmds.c
	* app/pdb/patterns_cmds.c
	* tools/pdbgen/enums.pl
	* libgimp/gimpbrush_pdb.[ch]
	* libgimp/gimpenums.c.tail
	* libgimp/gimpenums.h: regenerated.
2006-03-22 09:58:08 +00:00
Manish Singh b77ca997a7 make _gimp_enums_init public, so language bindings can do early enum
2005-06-03  Manish Singh  <yosh@gimp.org>

        * tools/pdbgen/enumcode.pl: make _gimp_enums_init public, so
        language bindings can do early enum registration if needed.

        * libgimp/gimpenums.h
        * libgimp/gimpenums.c.tail: regenerated

        * gimp.c: call gimp_enums_init instead of _gimp_enums_init.

        * gimp.def: add newly exported function.
2005-06-03 23:25:44 +00:00
Sven Neumann dd9b16147f app/text/text-enums.h moved enum to libgimpbase (from app/text and
2005-01-23  Sven Neumann  <sven@gimp.org>

	* app/text/text-enums.h
	* libgimpbase/gimpbaseenums.h: moved enum to libgimpbase (from
	app/text and libgimp).

	* libgimp/gimpenums.h
	* libgimpbase/gimpbaseenums.c
	* tools/pdbgen/enums.pl: regenerated.

	* libgimpbase/gimpbase.def
	* libgimp/gimp.def: updated.
2005-01-23 00:58:22 +00:00
Sven Neumann 98f48f2c1e app/paint/paint-enums.h moved enums to libgimpbase (from app/paint and
2005-01-23  Sven Neumann  <sven@gimp.org>

	* app/paint/paint-enums.h
	* libgimpbase/gimpbaseenums.h: moved enums to libgimpbase (from
	app/paint and libgimp). The remaining enums in
	app/paint/paint-enums.h need special treatment.

	* app/paint/paint-enums.c:
	* libgimp/gimpenums.h
	* libgimpbase/gimpbaseenums.c
	* tools/pdbgen/enums.pl: regenerated.

	* libgimpbase/gimpbase.def
	* libgimp/gimp.def: updated.
2005-01-23 00:00:20 +00:00