Commit Graph

43109 Commits

Author SHA1 Message Date
Ell 6419ed3246 app: fix toggling-off of alpha channel
Fix gimp:mask-components to use full-oapcity value for the alpha
component when it's masked-in and there's no "aux" input, so that
the image is rendered with full opacity when the alpha channel's
visiblity is toggled off, as per bug #143315.
2019-03-01 14:11:15 -05:00
Ell 6166f9ae14 app: disable spec. 8-bpp version of gimp:mask-components for non-little-endian platforms 2019-03-01 14:11:15 -05:00
Nathan Follens 1ddb38f0fa Update Dutch translation 2019-03-01 17:11:19 +00:00
Nathan Follens 4c15386441 Update Dutch translation
(cherry picked from commit d70a030b75)
2019-03-01 17:09:17 +00:00
Nathan Follens f7692e99af Update Dutch translation 2019-03-01 16:19:03 +00:00
Ell 1e739675a4 Issue #3037 - Crash in transform tools after transforming an out-of-bounds selection
In GimpTransformGridTool, fix weak-pointer initialization for the
out-of-bounds selection-boundary canvas item, to avoid a CRITICAL
when initializing the tool in transform-selection mode for a fully
out-of-bounds selection, and a subsequent segfault when re-
initializing the tool.
2019-03-01 09:07:14 -05:00
Øyvind Kolås dde7108584 build,app: require GEGL-0.4.14 2019-03-01 14:42:26 +01:00
Øyvind Kolås 3e2d9e6b9e build,app: require babl-0.1.62 2019-03-01 14:42:23 +01:00
Ell ac4b0fe9f1 app: add "Constrain handles", "Around center" options to the perspective tool
Add "Constrain handles" and "Around center" options to the
perspective-transform tool's GUI, which are similar to the
corresponding options of the unified-transform tool.  Both of these
options can already be controlled using Shift and Ctrl,
respectively, through the transform-grid widget, so we might as
well provide GUI toggles for them.
2019-02-28 15:46:41 -05:00
Ell cdc5782b3c app: fix transform-grid center point for non-affine transforms; use as pivot
In GimpToolTransformGrid, use the transformed center-point of the
original polygon as the position of the center-point handle, and as
a snapping point for the pivot when "cornersnap" is TRUE, instead
of using the center-point of the transformed polygon.  These two
points are different for non-affine transformations.

Furthermore, when "use-pivot-handle" is FALSE, use the center-
point as the reference point when transforming around the pivot,
instead of the pivot itself, which might not be set.  In
particular, this fixes transformation around the pivot in the
perspective tool.

Don't explicitly set the center-point as the pivot in the scale
tool, since this commit makes it unnecessary.
2019-02-28 15:46:41 -05:00
Ell a6c79770c3 Issue #1554 - Select by Color tool does not select pixel(s) or area(s) of pixel(s)
In gimp_pickable_contiguous_region_by_color(), add a small epsilon
to the threshold value, to allow for small errors due to the input
color and pickable pixel-colors being converted to the common
format through different paths.

While we *could* special-case threshold == 0 when the input color
comes from the same pickable, as is the case for the select-by-
color tool, and perform an exact comparison in the original format,
in the more general case the input color can come from an arbitrary
source, such as a plug-in.
2019-02-28 09:27:43 -05:00
Rodrigo Lledó 962b17de05 Update Spanish translation 2019-02-28 08:21:40 +00:00
Ell fe35294ee7 build: add Korean translation to the Windows installer
... but keep it disabled, since the Inno Setup Korean translation
is unofficial.
2019-02-27 03:41:27 -05:00
Ell ee49487cf2 po-windows-installer: technical fix to the Korean translations
ender's name can't be encoded in the target encoding -> use ASCII.
2019-02-27 03:41:27 -05:00
Sangdo Jun a621060cd6 Add Korean translation 2019-02-27 07:30:10 +00:00
Ell ebf2c2fef1 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.
2019-02-25 11:30:49 -05:00
Ell e83d8ac4f2 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.
2019-02-25 05:10:50 -05:00
Ell 914200f3ad 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.
2019-02-25 05:10:48 -05:00
Ell fb5987fd57 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.
2019-02-24 13:22:22 -05:00
Ell 5b09af4390 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.
2019-02-24 13:22:20 -05:00
Ell 0a1e62768a 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.
2019-02-24 13:20:31 -05:00
Piotr Drąg 88685bcf0e Update Polish translation 2019-02-24 17:37:50 +01:00
Michael Natterer aee097fa97 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.
2019-02-23 19:41:06 +01:00
Ell 11defa4271 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.
2019-02-22 12:02:09 -05:00
Ell bb645bae17 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.
2019-02-22 08:47:05 -05:00
Balázs Úr cbf581d42f Update Hungarian translation 2019-02-21 19:36:33 +00:00
Balázs Úr c87020fb73 Update Hungarian translation 2019-02-21 19:29:00 +00:00
Ell 7489f0aece 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.
2019-02-21 13:09:45 -05:00
Piotr Drąg 42975e52a5 Update Polish translation 2019-02-21 17:35:41 +01:00
Jehan d878551e60 devel-docs: clarify PROP_ITEM_PATH property. 2019-02-21 15:04:48 +01:00
Ell 8c96c3d1bb app, libgimp: communicate dark-theme preference to plug-ins through theme.css
The GUI implementation of gimp_wait() relies on the ability to run
plug-ins (namely, the busy-dialog plug-in) without entering the
main loop.  This prohibits the said plug-ins from making any PDB
calls, which would result in a deadlock.  However, we're currently
calling gimp_gimprc_query() to fetch the prefer-dark-theme option
during gimp_ui_init() (or any time the theme.css file changes).

Instead, communicate this preference through the theme.css file
itself, by writing a /* prefer-dark-theme */ comment to the file
when the option is set.  Yes, it's a bit of a hack :P
2019-02-20 14:40:11 -05:00
Michael Natterer 569f3e1bc2 app: use NON_LINEAR not PERCEPTUAL in file-pat-load and file-gbr-load 2019-02-19 23:43:58 +01:00
Michael Natterer 52adaa1963 app, plug-ins: move file-gih-load from the file-gih plug-in to the core 2019-02-19 23:41:34 +01:00
Michael Natterer 4b456e6079 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()
2019-02-19 23:24:41 +01:00
Michael Natterer 7aa99c8cf0 app: cosmetic change in file_pat_load_invoker()
just for consistency with file_gbr_load_invoker().
2019-02-19 23:16:22 +01:00
Michael Natterer 3b89ae40d0 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.
2019-02-19 23:13:59 +01:00
Jehan 7f05ec00cd app: reimplement gimp_widget_flush_expose().
gimp_widget_flush_expose() has been removed since commit 3089a20167.
I now reimplemented it by simply checking if event sources are waiting
to be processed.
This was heavily needed as the statusbar was not showing any progress
(at least on highly demanding process, such as saving or loading files),
and therefore we were stuck with a seamingly frozen GUI.

Despite the name, this does not apply to a widget in particular anymore,
but to the whole program events.
2019-02-19 15:31:50 +01:00
Ryuta Fujii 5719f9ac23 Update Japanese translation 2019-02-18 14:42:14 +00:00
Rodrigo Lledó aa5e557adc Update Spanish translation 2019-02-18 11:15:00 +00:00
Ell b5a34c3190 plug-ins: in file-dds, rename endian.h to endian_rw.h ...
... to avoid clashing with the system <endian.h>

Thanks Andrea!
2019-02-17 13:35:16 -05:00
Ell 6fe57a946b 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).
2019-02-16 14:19:09 -05:00
Ell 7c1429d1ff app: in gimp:mask-components, handle half-precision float formats 2019-02-16 13:09:41 -05:00
Ell af2c7d1b33 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.
2019-02-16 13:09:40 -05:00
Ell 1b900bfa16 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.
2019-02-16 13:09:39 -05:00
Michael Natterer 90164c4951 app, plug-ins: move brush (gbr) saving to the core
just the export logic remains in the plug-in, just as for patterns.
2019-02-16 19:01:33 +01:00
Michael Natterer b71ebcea6d plug-ins: forward the error message if file-pat-save-internal fails 2019-02-16 18:59:01 +01:00
Ell e513e9e054 app: in gimppaintcore-loops, in MaskComponents::finalize_step(), chain up 2019-02-16 10:11:00 -05:00
Ell c7d8d9ba2e 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.
2019-02-16 09:56:30 -05:00
Ell 08fa46ea41 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.
2019-02-16 09:56:30 -05:00
Ell 858f30a609 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.
2019-02-16 09:56:30 -05:00