Commit Graph

54469 Commits

Author SHA1 Message Date
Alx Sa 8e0cf62595 tools, operation: Add support for loading PS Levels presets
Photoshop stores their Levels filter presets in an
.alv file. This patch adds support for loading these
and converting them to GIMP's Level format.

The .alv file is binary, and consists of a 2 byte version
followed by 29 groups of 2 byte values for input,
output, and gamma. We only read the first four for
now, since GIMP only supports composite and then
R, G, and B individual channels.
2025-04-12 02:23:36 +00:00
Alx Sa 66f33cd967 tools, operation: Add support for loading PS Curve presets
Photoshop stores their Curve filter presets in an
.acv file. This patch adds support for loading these
and converting them to GIMP's Curves format.

The .acv file is binary, and consists of a 2 byte version
and 2 byte curve count. Then, you read in 2 bytes for
the number of curve points, followed by 2 bytes for
the Y value and 2 bytes for the X value. You repeat that
for the curve count defined in the header. PS Curves range from 2 to 19 points total.
2025-04-09 13:09:41 +00:00
Alx Sa 5b822032c8 widgets: Include filters in GimpBufferSourceBox buffer
Updates the code to use gimp_pickable_get_buffer_with_effects ()
which copies over the filters that the user sees when choosing
an Aux Input option.
2025-04-09 12:13:37 +00:00
Bruno Lopes f2bdf03b9a
build/linux: Do not set uneeded GIMP3_* dirs on (relocatable) AppImage
Relocatable builds do not need them.

Also, remove comments about the inspiration for the scripts since
they are now so refined that make no sense to link 3P sources.
2025-04-09 08:58:03 -03:00
Bruno Lopes 6d9a9d3d7b
build/windows: Log downgrade message when Installer is silent
Following: e447b124
2025-04-08 20:10:28 -03:00
Jehan 884353ed3d plug-ins: fix relocatability of the Python Console.
If we were running Gimp.locale_directory() at the very start of the
script, it would append before _gimp_reloc_init_lib() had happened, and
therefore the returned value would be the non-relocated locale
directory.

Calling this inside set_i18n() happens later, and also feels like the
proper place for this code.
2025-04-09 00:20:03 +02:00
Bruno Lopes 64d63cd937
build/windows: Use native icon from 'imageres.dll' on Installer dir page 2025-04-08 13:58:13 -03:00
Ekaterine Papava cef5ab3992 Update Georgian translation 2025-04-08 02:33:05 +00:00
Kolbjørn Stuestøl 14b1c11273 Update Norwegian Nynorsk translation 2025-04-07 19:17:57 +00:00
Alx Sa 8b0185ba8f tools: Don't crash when reading invalid Curves preset
When reading a gimp:curves preset file, we assume
that we read in at least 64 bytes for the header. If the
invalid preset file is smaller than that, g_input_stream_read_all ()
can read it just fine but the code fails when comparing the
bytes read in to the size of the header.

This means that the GError object is still NULL, so g_prefix_error ()
has no effect - and thus the calling code crashes when it tries
to get "message" from a NULL GError object.

To resolve this issue, we check if error or *error are NULL.
If so, we set the error with g_set_error () instead.
2025-04-07 18:57:31 +00:00
Bruno Lopes 43ae9fced5
build/linux: Prevent LD_LIBRARY_PATH leaking on AppImage
Closes #13603

Following 8fe7ddf3
2025-04-07 09:23:45 -03:00
Martin e4bf961cbb Update Slovenian translation 2025-04-07 10:29:51 +00:00
Yuri Chornoivan 7a242913fd Update Ukrainian translation 2025-04-07 06:26:01 +00:00
Bruno Lopes abeac94e8e
build/linux: Fix '--no-expand' param of conf_app function on AppImage script 2025-04-06 22:05:21 -03:00
Luming Zh b2493f4273 Update Chinese (China) translation 2025-04-07 00:52:13 +00:00
Bruno Lopes b303b6e20b Issue #13367: set Mesa drivers on Continuous appimage from stable series.
Partially reverts 3bbcdbd325
2025-04-06 20:19:31 +00:00
Bruno Lopes 87cfc65ab6 Issue #13367: use correct python*.exe on insider MSIX from stable series 2025-04-06 20:19:31 +00:00
Jehan c893a96298 Issue #13367: show commit in about dialog in all non-release builds.
The commit hash is not that useful on releases, even for unstable
releases, because a release is always at a known tagged commit anyway.

Note that I only change this for the About dialog where it's less
visible, and not on the canvas, because I do appreciate that stable
series show with a clean empty canvas. I like stable series to be closer
to a release state (even though it's true that having the commit hash
accessible somewhere for dev/continuous build is a useful feature).

Sorry to translators too! I break the string freeze during the stable
series. It's a string only visible on dev builds anyway, so it's not a
very urgent string anyway. Thanks for all the hard translation work! 🤗
2025-04-06 20:19:31 +00:00
Jehan 9d6f80c9dc Issue #13367: show devel warning on Windows installer even in dev build of stable series.
Also, set correct python interpreter (which attachs to debug console).
2025-04-06 20:19:31 +00:00
Jehan afa152ea54 Issue #13367: use correct AppImage and MSIX IDs for continuous builds.
Also make sure we ship the relevant graphviz runtime dependencies when
the debug menu is visible.
2025-04-06 20:19:31 +00:00
Bruno Lopes b2bf83a6bd
build/linux: Make AppImage script tool-agnostic (part 2) 2025-04-06 16:04:49 -03:00
Danial Behzadi e5c2791378 Update Persian translation 2025-04-06 18:01:41 +00:00
Bruno Lopes 30d7631d34
build/linux: Make AppImage script tool-agnostic (part 1) 2025-04-06 13:39:15 -03:00
Emin Tufan Çetin b514fa3338 Update Turkish translation 2025-04-06 16:25:03 +00:00
Emin Tufan Çetin 5c9e28634e Update Turkish translation 2025-04-06 16:19:17 +00:00
Jacob Boerema 257ac87e9f app: fix #13288 crash when opening a recently closed dock
When at least 3 recently closed docks were present in the Windows ->
Recently Closed Docks submenu, then clicking the middle one caused
a crash. Clicking the top or bottom one didn't cause a crash, but
the submenu was then removed so the other closed docks were not
visible anymore (until restarting GIMP).

It turns out we were removing the whole recent menu, instead of
picking the specific action that needed removing. So now we change
this to get the action_name and use that in the remove call.

Although this already fixes the crash, I added an extra check to
make sure action is valid, and if not we generate a critical. This
way we will notice something is wrong if this happens in the future,
without causing a crash here.
2025-04-04 19:29:04 +00:00
Alx Sa 9a3209844e themes: Fix display of .default response style
The .default style (to show which button is selected by
default) was being overridden by more general CSS styles.
This patch moves it after these general styles so that it
is shown again.
2025-04-04 18:10:12 +00:00
Alx Sa 20cf6d553a tools: Connect MoveOptions and TransformOptions to icon size
Resolves #13044
Same code as 816fb1c6, applied to the Move icon box
in GimpMoveOptions and the Transform icon box
in GimpTransformOptions.
2025-04-04 10:46:23 +00:00
Alx Sa 4dfa4924ff plug-ins: Use viewbox dims if needed for SVG
Starting in librsvg 2.54,
rsvg_handle_get_intrinsic_dimensions ()
always returns TRUE for width and height because
the SVG assumes a width/height of 100%.
This means that SVGs without explicit widths/heights
are loaded as 1px by 1px.
This patch adds a check to see if the width/height is
100%, and if the viewbox exists, we use those values
instead.
2025-04-04 02:09:02 +00:00
Bruno Lopes d66e58265d
Issue #11623: Use icons from `imageres.dll` for custom installer dialogs 2025-04-03 21:12:57 -03:00
Alx Sa 5201d194fa plug-ins: Read texture map size on DDS import
In 594afaf9, we changed how texture maps were imported.
The array size is now only loaded if we have a valid DX10 compression
set. However, GIMP allows you to export a texture map without
setting a DDS compression. Thus, any DDS images exported with
no compression would only load the first layer on import.

This patch moves the code that copies over the array items size to
be unconditional once the header is loaded.
2025-04-03 00:54:15 +00:00
Alx Sa 5a43663f09 paint: Prevent crash on expanding with pattern fill
Resolves #13501
When painting with "Expand Layers" on, we call gimp_get_fill_params ()
to get the color to fill in the new area. However, if the user has set the
fill type to Pattern, the color is NULL. This caused a crash because we
immediately try to set the alpha channel of the color to 1.0 if the layer
has no transparency - and if the color is NULL, that's not possible.
This patch checks if we received a valid GeglColor before trying to
set its alpha channel.
2025-04-02 13:57:24 +00:00
Bruno Lopes e447b1244b
build/windows: Prevent users from downgrading without uninstalling GIMP
That's not supported by Inno and our (confusing) custom code to
remove previous "old" GIMP versions seems to not support that.
2025-04-02 09:41:46 -03:00
Anders Jonsson 0486b11d5c plug-ins: fix dds volume map export with more than 2 layers
In 10b798c198 g_list_next always was used from the beginning of
the layer list for each call for volume map and array export, so
all layers after the first were the same.
2025-04-01 19:00:24 +00:00
Bruno Lopes e975c1625a meson, app, build: Fix Inno wrongly allowing to unninstall with GIMP running
Inno needs an AppMutex to be aware of GIMP execution so
prevent unninstalling or installing GIMP if still running.

(Unninstalling with GIMP running was making GIMP to not be
fully unninstaled since gimp*.exe process file was opened.
It also could cause problems with settings unninstall.)

(Installing with GIMP running was already not possible
since Inno code in that part is more refined but
that check isn't done before deleting .debug files)
2025-04-01 16:25:47 +00:00
Alx Sa b2b0ad7536 widgets: Set default response to GimpViewableDialog
Resolves #13504
Similar to c997349e, 2.10 users expect that pressing Enter
on dialogues such as Fill/Stroke Path should immediately commit
the operation. This default response may have been lost during the
GTK3 port, so we need to explicitly set the default response with
gtk_dialog_set_default_response () if a GTK_RESPONSE_OK has been
set.
2025-04-01 14:20:22 +00:00
Philipp Kiemle 812d43b278 Update German translation 2025-04-01 13:15:16 +00:00
Alexander Shopov d960c6c29c Update Bulgarian translation 2025-03-31 13:48:51 +00:00
Alexander Shopov ab847e6577 Update Bulgarian translation 2025-03-31 13:45:58 +00:00
Alexander Shopov 8acff211c6 Update Bulgarian translation 2025-03-31 13:42:09 +00:00
Alx Sa e494538393 pdb: Pass GIMP object when creating text layer via API
After discussing with Idriss, we found that if you create
a GimpTextLayer via the public API, the GIMP object
was not being stored in the GimpText object.
If markup like bold/italics was then applied, GIMP
would crash on saving as XCF because the serialization
code tried to access text->gimp_font_factory.
This patch resolves the issue by passing the GIMP
object into GimpText when we create it via the
API.
2025-03-31 11:07:14 +00:00
Bruno Lopes 089f98f795 build/windows: Use special fileicon for XCF on Installer and MSIX
Closes: #issue_sha
2025-03-31 10:50:49 +00:00
Alx Sa 76dccc32b1 themes: Another round of System Theme leak fixes
Based on user reports after the 3.0 release.
These leaks were most visible in the Preferences dialogue,
and cover too large checkboxes and radio boxes, wrong colors
for scrolled window backgrounds, sliders, scales, and
Preference Dialog headers.
2025-03-30 18:35:26 +00:00
Bruno Lopes 78b1377488
gitlab-ci: Do not set MSYS_ROOT in 'before_script' 2025-03-30 15:03:25 -03:00
Alx Sa 68c7329988 dialogs: "You Installed GIMP" text no longer selectable...
...in Welcome Dialog.
Resolves #13468

Per Jehan, there is no need for this text to be selectable,
especially as the other text on the Welcome Dialog is not.
This patch removes gtk_label_set_selectable () for the
"You installed GIMP x.y.z" text to keep it consistent.
2025-03-30 17:34:50 +00:00
Jordi Mas i Hernandez 8636aa4ec6 Update Catalan translation 2025-03-30 17:26:53 +00:00
Kolbjørn Stuestøl c791360b8c Update Norwegian Nynorsk translation 2025-03-30 16:12:02 +00:00
Kolbjørn Stuestøl 2966dbe547 Update Norwegian Nynorsk translation 2025-03-30 16:08:49 +00:00
Kolbjørn Stuestøl 83c78c3275 Update Norwegian Nynorsk translation 2025-03-30 16:03:18 +00:00
Alx Sa 238d0b3d31 plug-ins: Fix check for DDS cubemap option
Our DDS plug-in checks to see if we have six layers
with certain labels in their name to create a cubemap,
and if we don't, that option is locked.
When porting to GIMP 3 API, we accidentally kept checking
only the first layer's name instead of all six+ layers, thus
making it impossible to verify we had layers with the right labels.

This patch adjusts the iteration code to ensure we check all layers
in the image and not just the name of the first one.
2025-03-30 12:49:07 +00:00