Commit Graph

42391 Commits

Author SHA1 Message Date
Ell
bf793f9d59 build: add Korean translation to the Windows installer
... but keep it disabled, since the Inno Setup Korean translation
is unofficial.

(cherry picked from commit fe35294ee7)
2019-02-27 03:41:32 -05:00
Ell
7bdb482eff po-windows-installer: technical fix to the Korean translations
ender's name can't be encoded in the target encoding -> use ASCII.

(cherry picked from commit ee49487cf2)
2019-02-27 03:41:32 -05:00
297e4410d4 Add Korean translation 2019-02-27 07:26:57 +00:00
Ell
3f1e91fa0b app: in gimp_gegl_create_flatten_node(), explicitly set color node format
In gimp_gegl_create_flatten_node(), explicitly set the output
format of the background gegl:color node according to the composite
space, so that no conversion is required during compositing.

(cherry picked from commit ebf2c2fef1)
2019-02-25 11:31:03 -05:00
Ell
5d37a244dd app: merge layers in chunks, and show progress
In gimp_image_merge_layers() -- the internal function used by the
various layer-merging/flattenning functions -- process the merged-
layer graph in chunks, using gimp_gegl_apply_operation(), instead
of in one go, using gegl_node_blit_buffer().  Processing in chunks
better utilizes the cache, since it reduces the size of
intermediate buffers, reducing the chances of hitting the swap when
merging large images (see, for example, issue #3012.)

Additionally, this allows us to show progress indication.  Have the
relevant gimpimage-merge functions take a GimpProgress, and pass it
down to gimp_image_merge_layers().  Adapt all callers.

(cherry picked from commit e83d8ac4f2)
2019-02-25 05:10:59 -05:00
Ell
9de3b475ae app: streamline action_data_get_foo() functions
Streamline the various action_data_get_foo() functions, by having
each function only match the action data directly against its
specific type(s), and use the other functions to match the action
data against their corresponding types, instead of having each
function directly exhaust all possible matches.

Other than reducing depulication, it fixes certain cases in which
some action_data_get_foo() functions would fail to find a match,
even though one exists, since they failed to exhaust all the
options.

(cherry picked from commit 914200f3ad)
2019-02-25 05:10:58 -05:00
Ell
86e97536d3 app: in GimpSmudge, avoid copying brush pixmap when flow = 0
In GimpSmudge, avoid copying the brush's dab to the paint buffer
when using a pixmap brush if the flow parameter is 0 -- it has no
effect in this case.

(cherry picked from commit fb5987fd57)
2019-02-24 13:22:59 -05:00
Ell
2ea7deff4d app: improve gimp_brush_core_color_area_with_pixmap()
Reimplement gimp_brush_core_color_area_with_pixmap(), which copies
the brush's dab to the paint buffer when using a pixmap brush, in
terms of gimp-gegl-loops.  This simplifies the functions,
parallelizes processing, and transparently handles float brushes.

Replace the "mode" parameter of the function with an "apply_mask"
parameter, which specifies whether to apply the brush's mask to
the dab as part of copying.  Avoid applying the mask in
GimpPaintbrush; previously, we would erroneously apply the mask
twice when using the paintbrush tool: once when copying the
dab to the paint buffer, and again when pasting the paint buffer
to the canvas.

We still apply the mask in GimpSmudge, which results in the same
double-application behavior, however, this might be less practical
to fix.

(cherry picked from commit 5b09af4390)
2019-02-24 13:22:57 -05:00
Ell
25ed35af62 app: accept a const GimpTempBuf in more temp-buf functions
In gimp_temp_buf_{ref,unref}(), and
gimp_temp_buf_create_{buffer,pixmap}(), accept a const GimpTempBuf
argument.

(cherry picked from commit 0a1e62768a)
2019-02-24 13:22:28 -05:00
8b1a5ea0c2 Update Polish translation 2019-02-24 17:37:21 +01:00
db675d84e3 app: implement saving of GimpBrushPipes in the core
Just the GimpData::save() and ::copy() part that is needed to
duplicate and rename them, the image-to-pipe logic from the export
plug-in remains to be ported.

(cherry picked from commit aee097fa97)
2019-02-23 19:44:23 +01:00
Ell
50a09d2451 Issue #2997 - Error importing PCX
Commit dc069e424a removed the
assumption that 1-bpp PCX files are B&W, in favor of using the
provided palette, which is (supposedly?) the correct behavior.
However, there are evidently B&W files that do not specify a
palette, resulting in an all-black image (i.e., a 2-color indexed
image, whose both palette entries are black).  Since other
software, including older versions of GIMP, load such files
"correctly", let's fix this by falling back to a B&W palette when
the provded palette is uniform.

(cherry picked from commit 11defa4271)
2019-02-22 12:02:14 -05:00
Ell
a5130c7f66 app: add temp-buf-total varaible to the dashboard
Add a temp-buf-total variable to the dashboard's misc group,
showing the total size of all GimpTempBuf objects.

(cherry picked from commit bb645bae17)
2019-02-22 08:47:13 -05:00
66e15ba261 Update Hungarian translation 2019-02-21 19:33:58 +00:00
Ell
bf92987353 app: replace use of deprecated dont-cache/no_cache with cache-policy
Replace the use of the deprecated GeglNode::dont-cache property,
and GeglOperationClass::no_cache field, with GeglNode::cache-policy
and GeglOperationClass::cache_policy, respectively.

See commit gegl@7f24430cda0d8c3eff311868823d445edc2a4e12.

(cherry picked from commit 7489f0aece)
2019-02-21 13:09:49 -05:00
972c7ddede Update Polish translation 2019-02-21 17:35:00 +01:00
061bce7b7a Update Russian translation 2019-02-21 01:41:01 +03:00
088418e004 app, plug-ins: move file-gih-load from the file-gih plug-in to the core
(cherry picked from commit 52adaa1963)
2019-02-19 23:48:55 +01:00
45d3a054a4 app: some changes to GimpBrushPipe in preparation for .git image loading
- don't clear the names of the individual brushes, we need them for
  a load -> save roundtrip
- for the same reason, and for convenience, store the parameter string
  in the object
- clean up gimp_brush_pipe_finalize()

(cherry picked from commit 4b456e6079)
2019-02-19 23:48:09 +01:00
4944e61bc3 app: cosmetic change in file_pat_load_invoker()
just for consistency with file_gbr_load_invoker().

(cherry picked from commit 7aa99c8cf0)
2019-02-19 23:47:56 +01:00
13de8f2982 app: factor file_gbr_brush_to_layer() out of the brush-to-image logic
of file-gbr-load, and add some layer handling magic that doesn't
change a thing for simple brushes, but is needed for loading brush
pipes.

(cherry picked from commit 3b89ae40d0)
2019-02-19 23:47:34 +01:00
a07c086d7a Update Japanese translation 2019-02-18 14:42:36 +00:00
fc45f1189e Update Hungarian translation 2019-02-18 12:16:00 +00:00
de73cd294d Update Hungarian translation 2019-02-18 06:54:42 +00:00
Ell
bfa6285d23 plug-ins: in file-dds, rename endian.h to endian_rw.h ...
... to avoid clashing with the system <endian.h>

Thanks Andrea!

(cherry picked from commit b5a34c3190)
2019-02-17 13:35:22 -05:00
Ell
cbd712a2bd app: in operation tool, update scrolled-window size request when options-box size changes
In GimpOperationTool, update the options scrolled-window size
request whenever the size of the options box changes, instead of
only when constructing the GUI, since the options layout may change
dynamically through GUM, or through a custom GUI.
2019-02-17 04:20:11 -05:00
Ell
de1ac871e9 app: in gimppaintcore-loops, unsuppress COMBINE_PAINT_MASK_TO_CANVAS_BUFFER algorithm
In gimppaintcore-loops, unsuppress the
COMBINE_PAINT_MASK_TO_CANVAS_BUFFER algorithm (partially
reverts commit b717ead1abd487f663668ac131883dff0ffe4557.)

In gimp_paint_core_paste() it's always used together with
CANVAS_BUFFER_TO_PAINT_BUF_ALPHA, which matches a combined
algorithm, preventing it from being called, however, it can still
be called through gimp_paint_core_replace(), which uses it
together with CANVAS_BUFFER_TO_COMP_MASK, which doesn't have a
combined algorithm.  We can, however, filter out
CANVAS_BUFFER_TO_PAINT_BUF_ALPHA whenver
COMBINE_PAINT_MASK_TO_CANVAS_BUFFER is matched (since the combined
algorithm will be matched beforehand when both algorithms are
included).

(cherry picked from commit 6fe57a946b)
2019-02-16 14:19:20 -05:00
Ell
99130068bc app: in gimp:mask-components, handle half-precision float formats
(cherry picked from commit 7c1429d1ff)
2019-02-16 13:10:12 -05:00
Ell
d424a418cb app: in GimpDrawableFilter, don't mask-out alpha comonent for alpha-less drawables
In gimp_drawable_filter_sync_affect(), don't mask-out the filter's
alpha component when the drawable doesn't have an alpha channel,
since this is no longer necessary -- we now explicitly convert the
output to the drawable format as part of the graph -- and it
prevents the gimp:mask-components node from becoming a NOP.

(cherry picked from commit af2c7d1b33)
2019-02-16 13:10:12 -05:00
Ell
353951a44f app: set/clear component-mask alpha-bit of alpha-less drawables, to make mask uniform
In gimp_drawable_get_active_mask(), when the drawable doesn't have
an alpha channel, set or clear the mask's alpha bit, according to
the state of the other bits, so that it never gets in the way of a
fully set/clear mask.  The value of the alpha bit doesn't matter
when there's no alpha channel, however, having a uniform mask
allows us to skip component masking altogether.

Additionally, provide a default implementation for
GimpDrawable::get_active_mask() which returns a full mask, and
remove the equivalent implementation for GimpChannel.

(cherry picked from commit 1b900bfa16)
2019-02-16 13:10:11 -05:00
a04e24ce3e app, plug-ins: move brush (gbr) saving to the core
just the export logic remains in the plug-in, just as for patterns.

(cherry picked from commit 90164c4951)
2019-02-16 19:02:30 +01:00
c08932cab0 plug-ins: forward the error message if file-pat-save-internal fails
(cherry picked from commit b71ebcea6d)
2019-02-16 19:02:20 +01:00
Ell
339368f562 app: in gimppaintcore-loops, in MaskComponents::finalize_step(), chain up
(cherry picked from commit e513e9e054)
2019-02-16 10:11:10 -05:00
Ell
b6546536f9 app: use MASK_COMPONENTS algorithm in gimp_paint_core_{paste,replace}()
Remove the mask_components_onto() gimppaintcore-loops function, and
the GimpPaintCore::comp_buffer member.  Instead, in
gimp_paint_core_paste() and gimp_paint_core_replace(), use the
MASK_COMPONENTS algorithm, added in the previous commit.

(cherry picked from commit c7d8d9ba2e)
2019-02-16 10:02:38 -05:00
Ell
c4430b3deb app: in gimppaintcore-loops, add MASK_COMPONENTS algorithm
In gimppaintcore-loops, add a new MASK_COMPONENTS algorithm, which
masks the output of compositing into the destination buffer,
according to a component mask.  The algorithm uses the same code as
gimp:mask-comopnents, and can be used as part of a
gimp_paint_core_loops_process() pipeline, instead of using a
separate function.

(cherry picked from commit 08fa46ea41)
2019-02-16 10:01:10 -05:00
Ell
fe69dd2207 app: in gimppaintcore-loops, add [Temp]CompBuffer algorithm helper-classes
In gimppaintcore-loops, add a CompBuffer algorithm helper-class,
which provides access to the output buffer used for compositing,
to be used by the DO_LAYER_BLEND algorithm instead of the
destination buffer.

CompVuffer itself doesn't provide the storage for the buffer; this
is rather the responsibility of the algorithms that use it.  The
TempCompBuffer algorithm helper-class provides temporary storage
for the compositing buffer, and can be used by algorithms that need
a temporary buffer.

(cherry picked from commit 858f30a609)
2019-02-16 10:01:10 -05:00
Ell
ada815673e app: in gimppaintcore-loops, mark algorithms as mandatory/suppressed
In gimppaintcore-loops, use {Mandatory,Supressed}AlgorithmDispatch,
added in the previous commit, to mark certain algorithms as always
occuring, or never occuring, in all hierarchies.

(cherry picked from commit b717ead1ab)
2019-02-16 10:01:09 -05:00
Ell
8b86296979 app: in gimppaintcore-loops, add {Mandatory,Suppressed}AlgorithmDispatch
In gimppaintcore-loops, add MandatoryAlgorithmDispatch and
SuppressedAlgorithmDispatch class templates, which implement
dispatch functions suitable for algorithms which are always part of
the hierarchy, or never part of the hierarchy, respectively.  Using
one of these classes as the dispatch function for a given algorithm
verifies that the algorithm is/isn't included in the requested-
algorithm set, but doesn't otherwise increase the number of
instanciated hierarchies, since only one of these cases has to be
handled.

(cherry picked from commit fc7ffc71a3)
2019-02-16 10:01:09 -05:00
Ell
3dd2cf27b5 app: in gimppaintcore-loops, remove individual-algorithm functions
In gimppaintcore-loops, remove the individual-algorithm convenience
functions, which are merely wrappers around
gimp_paint_core_loops_process(), and aren't used anywhere anymore.
This allows us to avoid instanciating certain algorithm-hierarchies
which aren't used in practice, as will be done by the following
commits.

(cherry picked from commit 95761db557)
2019-02-16 10:01:07 -05:00
Ell
02b8845a2f app: improve gimp:mask-components
Add specialized versions of gimp:mask-components for 8-, 16-, and
32-bpc formats, to improve efficiency, and to preserve the contents
of masked-out components exactly.

Provide public functions for format-selection and processing, which
we'll use in the painting code, instead of reimplementing component
masking.

(cherry picked from commit ee156b8fd6)
2019-02-16 10:00:29 -05:00
Ell
3925ae5fbb app: convert gimp:mask-components to C++
... in preperation for next commit.

(cherry picked from commit a7f7a485bd)
2019-02-16 09:59:33 -05:00
07dd124e06 Update Marathi translation 2019-02-16 08:44:53 +00:00
08746b7e26 Update Marathi translation 2019-02-16 08:40:56 +00:00
Ell
83552620eb app: in gimp_gegl_apply_cached_operation(), don't dup src buffer for point ops
In gimp_gegl_apply_cached_operation(), when the source and
destination buffers are the same, avoid duplicating the source
buffer when the applied operation is a point operation, since
applying it in chunks from/to the same buffer is not a problem in
this case.

(cherry picked from commit 0d21f2469b)
2019-02-15 12:40:12 -05:00
Ell
bd67478b49 app: add gimp_gegl_node_is_point_operation()
... which takes a GeglNode, and determines if the associated
operation is a point operation.

Use in GimpFilterTool, instead of performing the same check
manually.

(cherry picked from commit 918f2e75bd)
2019-02-15 12:40:11 -05:00
ace1229823 Update Japanese translation 2019-02-15 14:10:20 +00:00
9a30591b1e Update Polish translation 2019-02-14 19:48:31 +01:00
Ell
3847404db6 app: #include <string.h> in gimpoperationreplace.c
... for memset().

(cherry picked from commit 0cf77b0a3b)
2019-02-14 11:09:21 -05:00
Ell
d4976dfc61 app: change behavior of REPLACE mode for fully-transparent pixels
When the result of compositing has an alpha value of 0, the
corresponding color value is not mathematically defined.
Currently, all out layer modes opt to preserve the destination's
color value in this case.  However, REPLACE mode is different
enough to warrant a different behavior:

Unlike the other layer modes, when the compositing opacity
approaches 0 or 1, the output color value approaches the
destination or source color values, respectively, regardless of the
output alpha value.  When the opacity doesn't approach 0 or 1, the
output color value generally doesn't approach a limit as the output
alpha value approaches 0, however, when both the destination and
source alpha values are equal, the output color value is always a
simple linear interpolation between the destination and source
color values, according to the opacity.  In other words, this means
that it's reasonable to simply use the above linear interpolation
for the output color value, whenever the output alpha value is 0.

Since filters are commonly combined with the input using REPALCE
mode with full opacity, this has the effect that filters may now
modify the color values of fully-transparent pixels.  This is
generally desirable, IMO, especially for point filters.  Indeed,
painting with REPLACE mode (i.e., with tools that use
gimp_paint_core_replace()) behaved excatly as described above, and
had this property, before we switched gimp_paint_core_replace() to
use the common compositing code; this created a discrepancy between
painting and applying filters, which is now gone.

A side effect of this change is that we can now turn gimp:replace
into a NOP when the opacity is 100% and there's no mask, which
avoids the compositing step when applying filters.  We could
previously only apply this optimization to PASS_THROUGH mode, which
is a subclass of REPLACE mode.

Note that the discussion above concerns the UNION composite mode,
which is the only mode we currently use REPLACE in.  We modify the
rest of the composite modes to match the new behavior:
CLIP_TO_BACKDROP always preserves the color values of the
destionation, CLIP_TO_LAYER always preserves the color values of
the source, and INTERSECTION always produces fully-zeroed pixels.

(cherry picked from commit 27e8f452b3)
2019-02-14 11:05:20 -05:00
Ell
f844965455 app: remove gimp_gegl_replace()
Remove gimp_gegl_replace(), which is not used anywhere since the
last commit.  It's redundant with the rest of our compositing code,
in particular, gimp:replace and gimp:mask-components.

(cherry picked from commit d2f8413173)
2019-02-14 11:05:20 -05:00