Commit Graph

221 Commits

Author SHA1 Message Date
5978def585 app: improve vivid-light formula 2017-01-23 22:40:10 +01:00
774687dcfe app: improve formulas of softlight and linear light blending modes 2017-01-23 19:03:44 +01:00
d3b8a0d007 app: s/trc/space/ in the property names too 2017-01-22 17:14:44 +01:00
2537d3d0e9 app: refer to (color) space instead of trc for blend/composite
Since CIE Lab is one of the supported color spaces for doing the blending -
this enum is not only about transfer functions/curves or gamma. This finishes
already started cleanups.
2017-01-22 16:04:50 +01:00
b10fc58802 app: add a "layer-mode" property to GimpOperationLayerMode 2017-01-22 14:41:21 +01:00
c9ad09df61 app: add a handful more blending innerloops
Adding linear burn, vivid light, linear light, pinlight and exclusion formulas
as described on
http://www.deepskycolors.com/archivo/2010/04/21/formulas-for-Photoshop-blending-modes.html
2017-01-22 13:41:49 +01:00
05f3d38acb app: rename GimpOperationPointLayerMode to GimpOperationLayerMode
and formatting cleanup.
2017-01-21 21:35:52 +01:00
Ell
0c35baecca app: in gimp_composite_blend(), more alloca avoiding 2017-01-21 09:06:08 -05:00
c993adf91e app: remove a trampoline in layer/paint mode dispatch
Fully removes one trampoline level and passing fewer args through the remaining
trampoline.
2017-01-21 14:10:03 +01:00
Ell
fb3b99553c app: in gimp_composite_blend(), avoid another alloca when doing in-place output 2017-01-21 07:18:47 -05:00
Ell
4d985d11df app: in gimp_composite_blend(), avoid an alloca when doing in-place output 2017-01-21 06:36:03 -05:00
Ell
5da89f0daf app: in gimp_composite_blend(), avoid overwriting input in some cases (again)
Revert commit f6436eee96, which was wrong,
and redo it the right way.
2017-01-19 16:16:44 -05:00
386e18e510 app: rename GimpLayerBlendTRC to GimpLayerColorSpace
It is used both for blending and compositing, the repeated use of the word
BLEND in code made the logic involving both blending and compositing hard to
read.
2017-01-19 19:17:24 +00:00
Ell
f6436eee96 app: in gimp_composite_blend(), avoid overwriting input in some cases
Note that in some cases the alloca may be unnecessary, but this keeps
the code clean, and we have to be able to *potentially* do the alloca
anyway, so what the hell.
2017-01-19 13:51:48 -05:00
a5ee5f28f9 app: cast ops using (gpointer) everywhere instead of 3 different ways 2017-01-19 19:04:49 +01:00
268e35a996 app: remove prepare() impls from erase and anti-erase
the calling code makes sure the ops have the right linear formats.
2017-01-19 18:49:22 +01:00
349cff8c16 app: remove "gboolean linear" from gimp_get_layer_mode_function()
and get rid of the two process_pixels() functions in the LCH modes,
they always take linear now.
2017-01-19 18:43:31 +01:00
Ell
417d9553b5 app: in gimpblendcomposite.h, small fix in compfun_dst_atop() 2017-01-19 12:03:39 -05:00
Ell
7df1bb4c0e app: in gimp_blend_composite(), fix dst_atop and avoid some conversions
Also s/comp_alpha/layer_alpha/ for consistency.
2017-01-19 11:55:21 -05:00
d656fbab86 app: coding style cleanup in all layer modes, fiddle with includes a bit 2017-01-19 17:48:45 +01:00
80c947f04f app: add missing breaks in switches of gimpblendcomposite 2017-01-19 14:25:04 +00:00
4683b986f3 app: use the GimpBlendFunc typedef in gimpblendcomposite.h 2017-01-19 14:46:29 +01:00
f645665324 app: unconditionally set alpha in hardlight/softlight/overlay 2017-01-19 14:44:39 +01:00
bfdea93a9c app: indentation and formatting cleanup in gimpblendcomposite.h
Also remove all includes, they should already be there when this
header gets included.
2017-01-19 14:31:40 +01:00
72cbda11ae app: composite_blend, fix src_over 2017-01-19 04:57:14 +01:00
41fff6990e app: make layer modes more configurable
Implement a common utility function gimp_blend_composite that uses utility
functions for implementing layer modes, with separate (possibly SIMD) optimized
loops for blending and compositing, with configured linear TRC, perceptual
gamma TRC or even using CIE Lab as the space.
2017-01-19 01:04:15 +01:00
6e72d3eddf app: add blend-trc and composite-mode properties to GimpOperationPointLayerMode
and set them to unused default values.
2017-01-17 15:09:17 +01:00
69c4644e15 app: rename GimpLayerModeFunction to GimpLayerModeFunc
like all other function typedefs and add GimpBlendFunc typedef which
will be needed soon. Also rename get_layer_mode_function() to
gimp_get_layer_mode_function().
2017-01-16 22:44:01 +01:00
e1b7eb7245 app: divide blend mode, limit high values to 5.0
Possibly counteracting inaccuracies in used babl conversions, but with this the
result match legacy as expected.
2017-01-16 02:36:11 +01:00
60847cce73 app: remove odd ratio scaling, replace with range check for nan 2017-01-15 01:33:40 +01:00
315ccc7f82 app: remove clamping in multiply mode 2017-01-15 01:33:40 +01:00
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
f01374798e app: remove clamps from addition, subtract and grain blend modes 2017-01-14 21:06:06 +01:00
39adf3627d app: use hypotf in lhc chroma blend mode 2017-01-14 21:03:29 +01:00
f8c65367f0 app: cache fishes in lch blend modes 2017-01-13 19:21:01 +00:00
975a0a6943 app: reuse more code 2017-01-13 19:21:01 +00:00
be8c2015a0 app: move factored out compositing to common header 2017-01-13 19:21:01 +00:00
acd20fb55b app: use cached fishes in lch chroma mode 2017-01-13 19:21:00 +00:00
7959141eb4 app: make compositing of hsv value blend mode consistent 2017-01-13 14:26:36 +01:00
75173b97d9 app: make compositing of grain extract blend mode consistent 2017-01-13 14:26:05 +01:00
954030fab6 app: make compositing of dodge blend mode consistent with rest 2017-01-13 14:25:46 +01:00
13eab78ecc app: improve and simplify alpha handling of LCH blending modes 2017-01-13 14:15:35 +01:00
feb2bb4083 app: lch color modes remove unneeded includes 2017-01-13 13:53:08 +01:00
0b1f684e8f app: remove unneded variable named tmp 2017-01-13 13:38:12 +01:00
24b04c0b40 app: use single precision hypotf and constants for performance 2017-01-13 13:17:25 +01:00
dc5b86f0eb app: add TRC variants to get_layer_mode_function() 2017-01-12 15:18:44 +01:00
77f9659c98 app: move gimplayermodefunctions.[ch] to layer-modes/ 2017-01-11 14:58:43 +01:00
b959e0b69b app: move GimpOperationPointLayerMode to layer-modes/ 2017-01-11 14:44:10 +01:00
Ell
e17f640fba app: eliminate unnecessary condition in GimpOperationReplaceMode
8-bit relic.
2017-01-11 08:21:02 -05:00
ad134263d2 app: clean up Makefile.am in layer-modes/ and layer-modes-legacy/ 2017-01-11 13:00:27 +01:00