Commit Graph

46686 Commits

Author SHA1 Message Date
3c674e3d42 Update Ukrainian translation 2021-01-22 18:27:10 +00:00
6df6332f9b Issue #987 Corrupt 'gimp-metadata' parasite. Parsing XMP data failed.
XMP metadata saved by GIMP 2.8.x or earlier can have duplicate tags
making the XMP data invalid. There's not much we can do without a
whole lot of processing and complicated code and even then no
guarantee we would catch everything.

Instead let's just try to improve the message to the user so they
will be more likely to understand what's going on.
2021-01-22 12:44:00 -05:00
25d80faaf3 app: Use GtkListBox for icon themes preference
Using a `GtkListBox` allows us to make more complex widgets when trying
to showcase an icon theme. For example, we can make the example icon a
bit bigger so you don't have to squeeze your eyes to distinsguish them
one from another.

Other possibilities we can do with this widget, is for example making
the folder label clickable to open the file explorer, or add a flat
button at the end with the same purpose. Since it's now just a
`GtkLabel`, we can also make the path selectable (for copy-pasting).
2021-01-22 11:33:31 +00:00
93baaa64f2 app: Use GtkListBox for title formats preference
Using a `GtkListBox` in the "Image Window Title & Statusbar formats"
preference pane allows us to make more complex rows, such as adding a
visual example of how the format string behaves on a given image title.

This commit just converts the `GtkTreeView` into a `GtkListBox`, so
nothing has functionally changed (yet), except that rows now give
feedback when the user hovers over them.
2021-01-22 11:33:31 +00:00
926eb43716 plug-ins: #5896. add option for reversing order of layers when importing PDF
This feature adds new 'Load in reverse order' toggle box to allow
selection of order of PDF pages before importing them as a layers or
images.

Adds new bool parameter 'reverse-order' to Non-interactive mode.
Order of parameters was also changed from (password, n-pages, pages)
to (password, reverse-order, n-pages, pages)
2021-01-22 10:44:06 +00:00
d3194c1f2f Update Catalan translation 2021-01-21 22:07:45 +01:00
6b65998bf7 xcf: fix #6138 Stack Overflow when saving xcf.
Although I haven't been able to reproduce it, it is apparently
possible to get a Stack Overflow when loading xcf files with
presumably very large dimensions on Windows. From what
I'm reading Windows normally has a smaller stack size than
Linux, probably why it hasn't surfaced there.

Instead of allocating on the stack let's do a g_malloc0
combined with g_free.
2021-01-21 11:39:34 -05:00
82209920a9 devel-docs: Introspected Python libgimp and libgimpui docs generation.
Based on the proposed process proposed by Akkana Peck. Thanks Akk!
For now, it's only in the meson build, which is fairly terrible to use
as soon as we do custom build rules. Here are the list of issues:

- meson does not allow building in subdir (issue 2320 on meson tracker).
  Sure I could make several subdirs with meson in them. But here the
  future goal would be to be able to generate docs for other
  introspected languages, and maybe also other output formats (epub or
  whatnot). For this, since these are basically the same commands which
  are used, the best practice would be to have loops generating one
  target per language/format combination, reusing code rather than ugly
  copy-pasting in subdirectories' meson files).
- custom_target() requires the output parameter to be the complete list
  of generated files. But we have more than a thousand of them. It's not
  practical. Maybe we could try to find a way to generate the list from
  the contents of the .def files which are already exhaustive and exact.
- Install also requires the output list to be complete.
- I temporarily have these docs not generated by default (because the
  gtk-doc option is already crazy slow as it is, making meson near
  unusable for development if it's enabled). If you want to generate the
  docs, the commands are as following (yeah I don't understand what the
  target names are for since meson does not actually create targets with
  these names, so we have to use fake output names instead):

> ninja devel-docs/g-ir-docs/Gimp-python-html
> ninja devel-docs/g-ir-docs/GimpUi-python-html
2021-01-21 16:50:47 +01:00
fee221167c app, libgimp, pdb: improve gimp_vectors_stroke_get_length() docs.
The `precision` parameter in particular had no min/max, which meant we
could provide a forbidden parameter (e.g. a negative precision) which
would cause a core CRITICAL. We must forbid illegal values from PDB side
(hence outputting a normal plug-in error message, not a core bug).

Also improving a bit the description of this parameter as I was
wondering what precision was needed exactly to get a stroke length. This
is the precision for determining whether a portion of the stroke is
"straight enough" or if we want to break it into smaller pieces until we
get a straight portion.
2021-01-20 20:33:41 +01:00
e813d90fbb app: allow 0.0 precision for gimp_coords_interpolate_bezier().
All it will mean is that we are looking for perfectly straight lines
when deciding if a bezier curve can be considered straight. It's a fair
condition and represents perfectly what a precision of 0.0 would mean.
2021-01-20 20:14:06 +01:00
00bbeabaf4 Issue #6210: Subpixel font rendering system settings should only…
… apply to GIMP GUI not text layer rendering in image.

Reviewer note: this is the theoretical fix, but it won't work right now
because Cairo explicitly bypasses grayscale antialiasing when system set
subpixel one. Still let's push this first patch, but the issue will be
actually fixed when Cairo will merge my MR too:
https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/114
2021-01-19 13:47:27 +01:00
1873f0d65c libgimpbase: fix memory leak in gimp_installation_directory().
Argh I should have properly reviewed !392 (commit c264f0b705).
It was leaking the return value of a g_path_get_basename().
2021-01-19 12:04:53 +01:00
58b98b941f libgimpbase: remove case of plug-ins binaries directly under plug-ins/.
In GIMP 3, plug-ins are mandatorily under a subdirectory. Though on GIMP
2.10.x, both cases are still possible. So only the previous commit
should be backported to gimp-2-10 branch.

See discussion in !392.
Thanks also to Christopher Nielsen for helping.
2021-01-19 11:40:00 +01:00
c264f0b705 gimp: macOS: fix for file export dialogs GIF and PNG. Authored by @pietervo, and he should be credited with this. 2021-01-19 10:36:40 +00:00
4e8087be85 Update Catalan translation 2021-01-18 22:59:59 +01:00
40b83450bd Update Swedish translation 2021-01-18 20:49:39 +00:00
a55cab8f80 plugins: feature #449 allow fract DPI values when importing PDF
This commit fixes the issue when requested page width/height was
not honored because DPI resolution value was constrained to whole
integer numbers only.
2021-01-18 19:27:08 +00:00
2b74bcb59a Update Serbian translation 2021-01-18 19:24:11 +00:00
76b5b97c2b Update Serbian (Latin) translation
(cherry picked from commit 342ad0b851)
2021-01-18 19:20:56 +00:00
593e9fa854 Update Serbian translation
(cherry picked from commit ede0292fd8)
2021-01-18 19:14:32 +00:00
549864089d Update Serbian translation 2021-01-18 19:07:40 +00:00
82f9329481 Update Serbian translation 2021-01-18 19:06:33 +00:00
aceeb38cf7 Update Serbian translation 2021-01-18 19:05:24 +00:00
c53b64452b Update Serbian translation 2021-01-18 19:01:47 +00:00
041104b5ec Paint Select tool: enable viewport-based local selection
The tool now takes care of the portion of the layer effectively displayed
on the screen. This allows faster expansion/shrink of the selection since
an area smaller than the whole layer is used.

It will also limit the impact of the incoming multilevels processing, which
tends to decrease the segmentation accuracy on thin structures, since users
often zoom-in to work on such thin details.
2021-01-18 18:43:39 +01:00
d21911ebfc Issue #3265: PNG gAMA chunk is silently ignored.
PNG has support for profiles, which is the state-of-the-art way to
handle color management nowadays. But it also had some very basic color
management based on a gAMA chunk (for the gamma) and a cHRM chunk
(primary chromaticities).
We don't have a core concept with just these and don't want to walk
backward anyway, but we can easily make basic RGB profiles from these.
This is what this commit is about. It generates profiles at import which
were not actually inside the image, but only represented by these 2 PNG
chunks. What gives it away is that GIMP will propose to convert/keep the
profile at start (unless configured otherwise, as any profile), and the
profile name will specify it is a profile generated from PNG chunks'
values.  One can even discard the profile later (if you didn't convert),
so it gives a solution if somehow these metadata were not proper.
2021-01-18 16:16:56 +01:00
7465b0782a plug-ins: more debugging data in file-darktable.
darktable GUI is "mangled" when opened from GIMP for a reporter. There
was already some debug info outputted (when running with DARKTABLE_DEBUG
environment variable). Adding the environment list (and some separation
titles to make it easier to distinguish what is what). Hopefully it will
help debugging.
See #6195 and https://github.com/darktable-org/darktable/issues/7402
2021-01-18 14:37:02 +01:00
6ca6a8d239 HEIF plug-in: ensure max quality for lossless encoding
There is a possible bug in libheif. Lossless setting is not working
when AVIF is saved via rav1e encoder.
This is a workaround of the problem.
2021-01-18 10:54:09 +00:00
e341f00875 Update Ukrainian translation 2021-01-18 10:17:31 +00:00
83ab86eb8b plug-ins: fix #6279 Error loading PSD file: Unexpected end of file.
We were not handling all possible record sizes for mask info and
in case it was an unknown size we set everything to 0 instead
of reading the parts we do recognize.

Let's make it more flexible by reading the parts we do know
about and skip the remaining data if any.

Also added a few more g_debug statements to make it
easier to check some values when needed.
2021-01-17 16:08:01 -05:00
823ae50cc5 plug-ins: fix crash at end of JPEG export.
Not sure why we didn't see the crash earlier and it suddenly shows up
now. Anyway we must delete the exported image **after** calling
gimp_procedure_config_end_export() on it, obviously.
2021-01-17 21:53:48 +01:00
07a3734db5 plug-ins: fix plugin-defs for file-heif.
Commit 01e1587ec1 had directly edited the Makefile.am, which was wrong.
This file is generated by plugin-defs.pl. Add the proper dependencies
for file-heif and regenerate the Makefile.am.
2021-01-17 20:32:23 +01:00
be457997f3 Update Japanese translation 2021-01-17 01:25:23 +00:00
f77e261cd4 plug-ins: export with explicit PNG's sRGB chunk when no profile written.
When a profile is set, we should not set the sRGB chunk, because it
would be a contradiction. But when we don't set the profile, then our
code explicitly saves as sRGB. So let's add the sRGB chunk.

Also when we do so, let's also set the relevant gAMA and cHRM chunks
corresponding to sRGB as recommended by the PNG spec:

> An application that writes the sRGB chunk should also write a gAMA
> chunk (and perhaps a cHRM chunk) for compatibility with applications
> that do not use the sRGB chunk. In this situation, only the following
> values may be used: […]

This is why I use png_set_sRGB_gAMA_and_cHRM() and not just
png_set_sRGB().
See also discussions in #5363.
2021-01-17 00:25:11 +01:00
26903fde73 Update Japanese translation 2021-01-16 22:43:44 +00:00
f78b131c1b Update Japanese translation 2021-01-16 22:37:30 +00:00
e7db1e688e Update Serbian (Latin) translation 2021-01-15 22:44:55 +00:00
0f6e6e0337 Update Serbian translation 2021-01-15 22:43:36 +00:00
16ddf3984e Update Catalan translation 2021-01-15 21:18:29 +01:00
cdf239b29a Update Catalan translation 2021-01-15 21:12:51 +01:00
773c3a88e5 HACKING: some update on coding style and other.
Add in particular some notes about alignments and trailing whitespaces.
2021-01-15 16:37:20 +01:00
dce0eef704 Update Serbian (Latin) translation 2021-01-15 01:33:34 +00:00
d9d8ae723a Update Serbian translation 2021-01-15 01:30:57 +00:00
fc955b8208 Update Serbian (Latin) translation 2021-01-15 00:12:50 +00:00
00db130ff6 Update Serbian translation 2021-01-15 00:10:24 +00:00
f489976b05 plug-ins: fix #5081 Opening TIFF with YCbCr format displays incorrect warning.
When testing for the presence of extra channels we were not taking into
account all values of TIFFTAG_PHOTOMETRIC causing incorrect messages
that we had a non conformant TIFF without ExtraSamples field.

Since the same test is used twice I separated the code into a new function
and also added another related function to have similar code grouped
together for easier maintenance.
2021-01-14 12:38:51 -05:00
8c3eb59ac0 Update Serbian (Latin) translation 2021-01-11 22:26:35 +00:00
bfa35ef378 Update Serbian translation 2021-01-11 22:05:59 +00:00
b962c07edc Update Japanese translation 2021-01-11 01:49:18 +00:00
234e006ffc Update Japanese translation 2021-01-11 01:48:24 +00:00