Commit Graph

40165 Commits

Author SHA1 Message Date
Darshan kadu a9a3a67cf2 plug-ins: 16/32 bit JPEG2000 support. 2018-03-16 21:39:08 +01:00
Jehan 4fdf301dea plug-ins: properly check widget class holding tag data.
Some tag data is hold in GtkEntry, other in GtkTextView, which are not
parent to each other. Previous checks were wrong and resulted in
"invalid cast from 'GtkEntry' to 'GtkTextView'" WARNINGs (followed by
many CRITICALs because of this first error).

Also properly free the data returned by gtk_text_buffer_get_text() which
is allocated (unlike strings returned by gtk_entry_get_text() which must
not be freed).
2018-03-16 20:20:24 +01:00
Jehan 8aaf77ba11 app: return from gimp_display_shell_space_pressed() immediately when...
... scrolling in progress.
In particular, this could happen while panning with mouse middle click
and hitting space. This space should simply be ignored.
2018-03-16 19:52:16 +01:00
Ell 9c663a6574 libgimpcolor: fix gimp_color_profile_get_lcms_format() for premul formats
It doesn't look like LCMS supports premultiplied alpha formats, so
we must convert them to the corresponding non-premultiplied formats
ourselves.
2018-03-16 12:48:51 -04:00
Jehan 6c8300923d Bug 779942 - Make GimpPickButton honor monitor profile.
Quartz/macOS implementation for the color picker.
This is untested but I am trying to advance our 2.10 blockers by
implementing the base code for this feature. Please anyone with macOS
machine access, review and fix if needed!
2018-03-16 17:17:54 +01:00
Jehan b279c2d217 Bug 724692 - Canvas rotation stuck with specific order of actions.
The bug was affecting actually both canvas rotation and panning when
done with space key. If the first mouse button was also clicked, then
released after the space key, we ended up in some stuck action. It could
only be unstuck by hitting/releasing space again.

I am actually unsure that this was not originally done on purpose,
especially since the code has these 2 status variables space_pressed and
space_release_pending, but really apart from looking at this code, the
behavior just looks very buggy and impracticable.
The new behavior is to just stop the canvas panning/rotation as soon as
space is released (which is also how it is documented in our manual, and
how everyone seems to use the feature). I only kept the variable
space_release_pending, which I use as was used space_pressed before.
2018-03-16 14:23:41 +01:00
Ell dc1852049e app: throttle GimpCanvasProgress updates
Avoid redrawing GimpCanvasProgress items upon
GimpProgress::set_value() if a minimal amount of time hasn't passed
since the last call.  This notably improves performance of
frequently-updated GimpCanvasProgress items.
2018-03-16 04:34:00 -04:00
Ell 1cc90e52bb app: fix indentation in gimpcanvasprogress.c 2018-03-16 04:34:00 -04:00
Ell 9799803fae libgimpbase: add gimp_distance_metric_get_type() to .def file 2018-03-15 18:02:22 -04:00
Jehan c5a0189b7f libgimp, pdb: some generated files which were not in previous commits.
It's weird. I didn't see these when I added the GimpDistanceMetric enum
type. Not sure why. Adding these now.
2018-03-15 15:05:32 +01:00
Jehan c403e472d6 app: don't sync Blend tool's gradient-repeat property with gimp:blend...
... when gradient_type >= GIMP_GRADIENT_SHAPEBURST_ANGULAR.
Our current GUI code for the Blend tool options disables the "Repeat"
widget with any of the shaped and spiral gradient types, which means (I
assume) no repeat mode is allowed on these gradients. Nevertheless it
was possible to change the repeat mode in another gradient type, then
switch to one of these and get the repeat processed even though the GUI
shows insensitive.
I could simply reset the repeat mode to GIMP_REPEAT_NONE when setting
one of these gradient types, but I think you'd want the repeat to stay
at its value (being insensitive is enough to mean whatever value is set
is not taken into account). So instead, I just unsync this specific
property when appropriate.
Note also I don't do this in the gimp:blend operation code because I am
not sure this specific behavior is meant to be a generic blend behavior
or just relative to the tool (render of the shaped gradients is barely
different with a repeat, but there is still a difference).
2018-03-15 15:03:05 +01:00
Jehan 87330a7746 app: add "distance-metric" property to the Blend tool options.
It seems old blend tool (from GIMP 2.8) was using manhattan distance,
whereas the new one uses euclidean. I guess there must be use cases for
both. In any case, it is a good idea to simply propose the option since
the property exists in the "gegl:distance-transform" operation.
See also bug 781621.
2018-03-15 13:24:59 +01:00
Ell a7f3a2dd9f app, pdb, libgimp, plug-ins, menus: rename layer composite modes
Our composite modes don't correspond directly to the Porter-Duff
operators after which they're named, and these names aren't too
descriptive anyway.

Rename the composite modes as follows:

  Source Over       =>  Union
  Source Atop       =>  Clip to Backdrop
  Destination Atop  =>  Clip to Layer
  Source In         =>  Intersection

Update relevant code, including UI text, enumerator names, function
names, and action names.
2018-03-14 16:19:09 -04:00
Ell d29facda23 pdb: fix paths in README_NEW_PDB_PROC
s:tools/pdbgen:pdb:
2018-03-14 15:04:25 -04:00
Ell 466025abd4 pdb: fix generated file paths in enumgen.pl
s:tools/pdbgen:pdb:
2018-03-14 15:04:03 -04:00
Jehan 11ce60ba3d app: check "gradient-repeat" sensitivity at Blend Options creation.
When starting the tool with one of the gradient types for which the
repeat option should be deactivated, it is not. Run the handler function
once at GUI creation.
Also compare the gradient type with an enum value, which makes the test
clearer than using an int.
2018-03-14 18:57:45 +01:00
Jehan 5751bb114e Bug 781621 - PDB shapeburst gradient is slower than the blend tool.
PDB function gimp_edit_blend() was based on "gimp:shapeburst" operation
whereas the rest of GIMP (in particular, the Blend tool) used
"gegl:distance-transform" which is much faster.
Setting the operation to "manhattan" metric ensures that it still
renders the same way as in 2.8 while being a lot faster.

There was still a problem regarding as how it renders differently from
the Blend tool, but it turns out that the Blend tool is the one
rendering differently from how it used to in 2.8. We should discuss
adding the "metric" property in the tool options.
2018-03-14 16:07:18 +01:00
Jehan 6f127f9db4 app: disable multi-threading on "gimp:shapeburst" operation.
This operation is currently broken on multi-thread. So disable
multi-threading, at least temporarily (if not forever since apparently
we can get similar output with "gegl:distance-transform", but much
faster and nicer). See bug 781621.
2018-03-13 18:24:08 +01:00
Mario Blättermann 7e6c93379b Update German translation 2018-03-12 09:58:06 +00:00
Balázs Meskó e47d3eb8eb Update Hungarian translation 2018-03-12 06:32:36 +00:00
Tim Sabsch fbc32fd659 Update German translation 2018-03-11 18:52:46 +00:00
Dimitris Spingos (Δημήτρης Σπίγγος) e3a4a63140 Update Greek translation 2018-03-11 20:06:56 +02:00
Piotr Drąg df0c898b39 Update Polish translation 2018-03-11 17:03:21 +01:00
Alexandre Prokoudine 467dc06edb NEWS: keep updated 2018-03-11 13:02:35 +03:00
Hajime Taira a7644a130d Update Japanese translation 2018-03-11 01:44:39 +00:00
Piotr Drąg c3624a2089 Update POTFILES.skip 2018-03-11 00:43:40 +01:00
Ell c2c5fedd13 po: update gimp-debug-tool.c path in POTFILES.in 2018-03-10 18:28:14 -05:00
Ell c0c6856190 build: add Latvian translation to the Windows installer
... but keep it disabled for now, since some of the characters may
not render correctly.
2018-03-10 18:23:18 -05:00
Ell 0b625df2ce po-windows-installer: technical fix to Hungarian, Latvian translations
ender's name can't be encoded in the target encoding -> use ASCII.
2018-03-10 18:22:56 -05:00
Ell bf6d9b7fd8 app-tools: fix gimp-debug-tool usage message 2018-03-10 17:56:56 -05:00
Ell 5893d2dc73 tools, app-tools: move gimp-debug-tool from tools/ to app-tools/
Move gimp-debug-tools.c from tools/ to a new app-tools/ subdir,
which should contain external tools needed by app/, and which is
built *after* app/ (unlinke tools/).  This allows gimp-debug-tool
to depend on libapp and libappwidgets, instead of on actual source
files from app/.  Building sources from app/ in another subdir
screws with the distclean rules, and breaks distcheck.
2018-03-10 17:56:56 -05:00
Ell 646a56fe8a Makefile.am: add git-version.h to EXTRA_DIST
We only generate it when building from git.
2018-03-10 17:56:55 -05:00
Mario Blättermann 87ca71e7c2 Update German translation 2018-03-10 22:02:28 +00:00
Mario Blättermann 17767c64a3 Update German translation 2018-03-10 21:58:19 +00:00
Rūdolfs Mazurs 1ad1790864 Update Latvian translation 2018-03-10 21:52:22 +02:00
Ell b590b59542 app: fix #include order in gimp-spawn.c
... so that GLib is included before the platform-specific headers,
so that we can check for G_OS_WIN32.

Spotted by Partha, as usual :)
2018-03-10 02:22:40 -05:00
Jehan 8de34f704d plug-ins: clean a bit commented-out code.
These are remnants from the old Jasper implementation and should have
been deleted days ago.
2018-03-10 03:14:54 +01:00
Jiro Matsuzawa ad9079db87 Update Japanese translation 2018-03-10 01:37:28 +00:00
Jehan a9ff5e14ce plug-ins: run gimp_image_set_color_profile() after image creation.
After moving up the profile extraction, I was running
gimp_image_set_color_profile() with a non-existing image id, which was
obviously wrong. Reorder a bit the operations.

Also try to guess the color space from the profile not only with
OPJ_CLRSPC_UNSPECIFIED but also OPJ_CLRSPC_UNKNOWN images. Indeed I
encountered a case of .jp2 image with no color space in the header, but
with an embedded profile. And unlike the .j2c files I encountered
earlier, the color space was now *_UNKNOWN.
See https://github.com/uclouvain/openjpeg/issues/1103
2018-03-10 02:00:07 +01:00
Jehan 3d55452933 Bug 794152 - JPEG 2000 Code Stream .j2c support.
Current OpenJPEG code only supported the base JP2 container. It now
supports also the JPEG 2000 codestream (which is usually contained
inside other formats, like the JP2 container format, but can also
sometimes be on its own).
The current magics and extension strings were also mixing all kind of
formats. This is now cleaned up a bit.
2018-03-10 00:03:15 +01:00
Jehan 00e828a3ef plug-ins: deduct color space from profile if not specified otherwise.
As explained in the previous commit, the color space is not always
properly declared, in particular with J2K files. If a profile is present
in such a case, try to deduct the color space from this information.
2018-03-09 22:12:23 +01:00
Jehan 6f5c20eef1 plug-ins: assume RGB/RGBA for JPEG2000 without declared color space.
It seems that the color space is not necessarily declared for a JPEG2000
image. From tests, it looks like it especially happens with JPEG2000
codestream (.j2c or .j2k). This variant is apparently mostly designed to
be embedded (from what I read), which may explain why the color space is
not always set (I assume the embedding format would have the color space
information). Mostly a guess.
2018-03-09 21:59:04 +01:00
Jehan 65ba879c65 configure: make clearer the test for native GEGL executable.
If running for instance in a cross-compilation, I need to make clearer
the fact we are looking for a native GEGL and also that we are looking
for the executable (used during the build), not the library. This is a
different test as the one for the library with PKG_CHECK_MODULES (which
looks for the target platform's library).
2018-03-09 17:46:02 +01:00
Jehan ca1304da19 plug-ins: make the JP2 loading errors more accurate. 2018-03-09 16:44:13 +01:00
Ell 7e1fd5983c app: fix tooltip of propgui color buttons
Source/target arguments of bind_tooltip() were swapped.
2018-03-08 15:24:21 -05:00
Ell 8d9580fd2b app: update layers-dialog floating-sel attrs/highlight when image changes
Move the button-highlight update to its own function, and call it
when the active image changes, as well as when its floating
selection changes.

Call the floating-selection-changed signal handler when the active
image changes, so that we correctly update its row's attributes.
2018-03-07 10:58:25 -05:00
Ell b1266b2c3f app: #include <string.h> in GimpHighlightableButton
Needed for memcmp().
2018-03-07 09:53:31 -05:00
Ell 378c5d3b87 app: don't highlight layers dialog "new" button when pasting to channel
We disallow creating a new layer from a floating selection when its
associated drawable is a channel, so there's no point in
highlighting the "new layer" button in this case.  Note that the
"layers-new" action remains sensitive, showing an error message if
activated.  Not sure if it's a good thing or not, but whatever.
2018-03-07 09:40:19 -05:00
Ell 7dd373293c app: reduce opacity of GimpHighlightableButton when insensitive 2018-03-07 09:40:19 -05:00
Ell e4c79cb2d6 app: use gimp_cairo_rounded_rectangle() in GimpOverlayFrame
... instead of drawing it the hard way.
2018-03-07 09:40:19 -05:00