Commit Graph

38074 Commits

Author SHA1 Message Date
Michael Natterer d3b8a0d007 app: s/trc/space/ in the property names too 2017-01-22 17:14:44 +01:00
Øyvind Kolås 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
Michael Natterer b10fc58802 app: add a "layer-mode" property to GimpOperationLayerMode 2017-01-22 14:41:21 +01:00
Michael Natterer d293a00995 app, menus: add gegl:edge-neon to Filters -> Edge Detect 2017-01-22 14:35:35 +01:00
Øyvind Kolås 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
Michael Natterer 7079d5f730 app: add a huge switch() to gimp_layer_mode_get_composite_mode()
It's going to be used to the UI too and should return something
to display, even if immutable.
2017-01-21 22:31:09 +01:00
Øyvind Kolås da10525073 app: change default composite mode for new modes to src-atop 2017-01-21 22:12:23 +01:00
Michael Natterer c152fa8651 app: fix the blend space of the legacy modes to be perceptual 2017-01-21 22:03:40 +01:00
Michael Natterer 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
Øyvind Kolås 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
Michael Natterer a1b844897c app: make GimpPaintOptions' "use-applicator" default to FALSE again 2017-01-21 00:29:41 +01:00
Michael Natterer 485094b9da app: fix painting with the new layer mode code
by creating temp buffers matching the format needed by the
GimpLayerMode's process_pixels() function.
2017-01-21 00:27:48 +01:00
Michael Natterer 2acd2fe74c app: do_layer_blend(): pass the right blend/composite parameters
based on the used GimpLayerMode.
2017-01-21 00:02:22 +01:00
Jehan 1835b2ae61 app: improve precision of paint tools' straight line distance...
... in status bar.
Follow-up of commits f836892 and d1c3c3d. With high resolutions, the
distance displayed in the status bar when shift-clicking in a paint tool
may lack digit precision and show the same value (in non-pixel unit) for
several consecutive pixels. Compute a more accurate precision than what
gimp_unit_get_digits() can provide in such cases.
2017-01-20 00:40:41 +01:00
Jehan d1c3c3deb0 app: improve Measure Tool digit precision.
When working with high resolution, you may have cases where measured
length won't be displayed with enough digits; i.e. several pixels length
would show up as 0. For instance at 4000 PPI, up to 7 pixels show up as
0 mm, then at 0.1 mm from the 8th pixel (actually reaching over 0.05 mm,
approximating as 0.1), then 0.2 at 24 pixels (actually: 0.152), and so
on. At such a resolution, 3 digits are needed for 'mm' instead of the
1 digit returned by gimp_unit_get_digits() so that we display reliable
lengths.
Therefore we need to compute ideal digit precision. Configured digits
for a given unit will now be used as a minimum value, but actually used
digits may be higher.
2017-01-20 00:40:27 +01:00
Jehan 7a330dcf6a libgimpbase: update gimp_unit_get_digits() description.
Digit accuracy being "approximately the same as an inch with 2 digits"
is only true for built-in units, not user-defined ones.
2017-01-20 00:40:27 +01:00
Jehan 3ab25af742 libgimpbase: fix a few typos. 2017-01-20 00:40:27 +01:00
Jehan f836892314 Bug 763734 - better decimal places for physical units.
Compute the ideal decimal precision for cursor position and length
status so that you get the best precision on physical units depending
on the current resolution, yet avoiding over-precision (which can be
misleading). The unit's "digits" value is now used as a minimum
precision only.
2017-01-20 00:40:27 +01: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
Øyvind Kolås 894d4c0c01 app: finish GimpLayerColorSpace rename 2017-01-19 19:33:17 +00:00
Øyvind Kolås e9d72ef2a8 app: finish GimpLayerColorSpace rename 2017-01-19 19:22:40 +00:00
Øyvind Kolås 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
Michael Natterer a5ee5f28f9 app: cast ops using (gpointer) everywhere instead of 3 different ways 2017-01-19 19:04:49 +01:00
Michael Natterer 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
Michael Natterer 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
Michael Natterer d656fbab86 app: coding style cleanup in all layer modes, fiddle with includes a bit 2017-01-19 17:48:45 +01:00
Øyvind Kolås 80c947f04f app: add missing breaks in switches of gimpblendcomposite 2017-01-19 14:25:04 +00:00
Michael Natterer 4e9ce952d9 app: indentation in operations-types.h 2017-01-19 14:47:48 +01:00
Michael Natterer 4683b986f3 app: use the GimpBlendFunc typedef in gimpblendcomposite.h 2017-01-19 14:46:29 +01:00
Øyvind Kolås f645665324 app: unconditionally set alpha in hardlight/softlight/overlay 2017-01-19 14:44:39 +01:00
Michael Natterer 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
Øyvind Kolås 72cbda11ae app: composite_blend, fix src_over 2017-01-19 04:57:14 +01:00
Øyvind Kolås 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
Øyvind Kolås d1fea4d6c6 png: add a combo-box for specifying png bitdepth/variant
When working in high bitdepth, manually changing precision to 8bit or 16bit is
an extraenous step, this adds a conversion step - but doesn't permit dithering
- and also doesn't permit using the palette modes of PNG. However it makes
workflows with single precision linear floating point much more usable.
2017-01-19 01:02:17 +01:00
Jehan 7236ca593e NEWS: minor fixes. 2017-01-18 19:03:31 +01:00
Michael Natterer 1262370544 app: remove "gboolean linear" parameters
from gimp_applicator_new() and gimp_gegl_mode_node_set_mode().
Compositing doesn't depend on the layer format any longer, only on the
layer mode. Painting with "use applicator" unchecked is still broken
in some cases and needs more fixing.
2017-01-18 00:15:55 +01:00
Michael Natterer b809613be0 app: implement gimp_layer_mode_get_blend_trc() 2017-01-17 17:41:05 +01:00
Øyvind Kolås 0bcb3068fe app: fix typo s/GIMP_LAYER_COMPOSITE_OVER/GIMP_LAYER_COMPOSITE_SRC_OVER/ 2017-01-17 15:23:36 +01:00
Michael Natterer 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
Michael Natterer dd3eec6198 app: change linking order of the sub-libs of app/operations
so layer-modes/ can use the enums in enums-types.h without failing to
link.
2017-01-17 14:28:40 +01:00
Michael Natterer 5c4eb75361 app: register the enums in operations-enums.h as GTypes
and rename them to GimpLayerBlendTRC and GimpLayerCompositeMode.
2017-01-17 01:19:06 +01:00
Michael Natterer e267d87963 app: add operations-enums.h with two soon-needed enums 2017-01-16 23:07:50 +01:00
Michael Natterer 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
Tiago Santos b2e1237480 Update Portuguese translation 2017-01-16 21:12:13 +00:00