Commit graph

8052 commits

Author SHA1 Message Date
Alex Samorukov
8f3da0e8c4 Allow compilation on MacOS 10.5 leopard: issues #2923, #2924 and #2925 2019-03-23 23:33:07 +00:00
Jehan
66c47ee23f plug-ins: do not needlessly free/malloc() buffer of same size.
In an animated WebP, chances that layers/frame have the same size is
high. It is uneeded to free then malloc again a buffer at each frame,
unless we need more allocated memory.
This is probably not so significant, but still feels nicer.

(cherry picked from commit 0b68ce8182)
2019-03-19 12:54:13 +01:00
Jehan
18a2f576bb plug-ins: try to clarify "save-transp-pixels" argument of tiff saving.
This argument should actually say "Do not store premultiplied channel
values", which is what the TIFF spec calls "Unassociated alpha" (vs.
"associated alpha" when values are stored premultiplied by alpha).

Now I can see where the current description is coming from, which is
that any color with alpha 0 (totally masked) ends up as RGBA value (0,
0, 0, 0), in other words, the color information is completely lost. Yet
this label is not very helpful to understand what the checkbox really
does. I decided to not just change it altogether as people would have
gotten used to this for years, but at least adding completary
information in API and tooltip in GUI.
2019-03-11 10:45:28 +01:00
Ell
2dad85b84f libgimpwidgets, app, plug-ins: use GimpSpinButton everywhere
Replace all direct uses of GtkSpinButton with GimpSpinButton, so
that its modified behavior extends to all our spin buttons.
2019-03-09 07:43:13 -05:00
Jehan
a0a7ead13f plug-ins: tiff exporting can now support INDEXED*.
Not sure what this @image_types parameter of gimp_install_procedure() is
used for. Exporting was working find with INDEXEDA image even when not
advertized by this function. Let's update this anyway.
2019-03-09 12:17:46 +01:00
Jehan
72e86545f0 Issue #102: TIFF plugin doesn't handle indexed images with alpha...
... channel.
2019-03-09 12:11:25 +01:00
Jehan
7812aced5d Issue #1256: Import damages colormap numbering.
Do not remove fully transparent colors from the PNG palette.
2019-03-08 15:12:04 +01:00
Michael Natterer
4ee74a11e6 app, plug-ins: move brush pipe saving from the file-gih plug-in to the core
As with .gbr and .pat, only the actual saving code, not the export
logic and GUI.

(cherry picked from commit cc7e07fecb)
2019-03-03 20:07:07 +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
Michael Natterer
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
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
Michael Natterer
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
Michael Natterer
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
Jehan
e24f9eec37 Issue #2961: minor coding style fix.
Missing space, and anyway let's use named parameters, which makes the
code better self-documented.

(cherry picked from commit 35eff00e2e)
2019-02-14 12:12:24 +01:00
Veerasamy Sevagen
3ff2285ba8 Setting the FileChooserbutton to a fixed width.
(cherry picked from commit 582801ccc5)
(cherry picked from commit b44c2e9352)
(cherry picked from commit cdd686f752)
(cherry picked from commit 3b818f6a9b)
(cherry picked from commit c7d5438b49)

Note from reviewer: sorry, this was not squashed on master! Gitlab
failed to squash even though the "squash commits" checkbox was checked!
So it ended as a 5-commit 1-line change!
:-/
2019-02-13 17:16:30 +01:00
Michael Natterer
64d0e29e42 plug-ins: remove stuff that is no longer needed from file-pat
(cherry picked from commit 52b1348f3d)
2019-02-12 21:39:23 +01:00
Michael Natterer
7ce90a19b4 app, plug-ins: move pattern saving to the core
but only the actual saving code, not the export magic and dialog.

Add new internal procedure file-pat-save-internal which is not
registered as a file procedure and always works non-interactively on
the passed arguments and only saves the passed drawable. Use the new
internal procedure from the file-pat-save code and remove all file
writing code from the plug-in.

This way all pattern file writing code duplication is killed, while
the whole export mechanism is completely unchanged.

(cherry picked from commit b29ecfb5da)
2019-02-12 21:34:17 +01:00
Michael Natterer
b3797079bc app: move file-pat-load from the file-pat plug-in to the core
(cherry picked from commit 410ffc435e)
2019-02-11 18:39:04 +01:00
Michael Natterer
616f5aac11 app, plug-ins: start consolidating brush and pattern loading/saving code
We currently have brush and pattern I/O code in both the core and
plug-ins. This commit starts removing plug-in code in favor of having
one copy of the code in the core, much like XCF loading and saving is
implemented.

Add app/file-data/ module with file procedure registering code, for
now just with an implementation of file-gbr-load.

Remove the file-gbr-load code from the file-gbr plug-in.

(cherry picked from commit a4e77e57f6)
2019-02-11 12:56:56 +01:00
Elad Shahar
eeeab8b209 Add i18n support for python spyrogimp plugin
(cherry picked from commit f6e4145756)
2019-02-01 07:41:23 -05:00
Ell
d2bc3eeb5d plug-ins: in pygimp/plug-ins/Makefile.am, simplify plug-in copy recipe
(cherry picked from commit 12dbd4aee2)
2019-02-01 07:41:22 -05:00
Ell
5f398c0888 plug-ins: in pygimp/plug-ins/Makefile.am, re-copy plug-ins upon change
In pygimp/plug-ins/Makefile.am, fix the rule for the generated
plug-in files, so that they're re-copied to the build dir upon
changes to the source plug-in files.

(cherry picked from commit 95044d86b3)
2019-02-01 07:12:38 -05:00
Ell
301691b3ed plug-ins: in pygimp/plug-ins/Makesfile.am, use tab-width of 8
... like the rest of our makefiles.

(cherry picked from commit bcd9f55526)
2019-02-01 07:12:38 -05:00
Michael Natterer
b81723042e plug-ins: add .gitignore file to file-dds
(cherry picked from commit 0fa98d4849)
2019-01-30 18:49:36 +01:00
Ell
d11d094d02 Issue #1119 - Unable to give a layer group as a parameter to a python script
Pickle gimp.GroupLayer the same way we pickle gimp.Layer, so that
layer-group parameters can be properly saved.

All credit goes to Ofnuts :)

(cherry picked from commit b295a33aaf)
2019-01-26 16:02:26 -05:00
Jehan
69712634a1 plug-ins: optionally define several float.h macros for MinGW64.
This plug-in failed to cross-build because these macros were not defined
in the `float.h` of my MinGW64 environment (and they are used in some
ilmbase headers). Just define them ourselves if they are absent. I do
this only on MinGW environment because these should really be defined on
Linux (and other UNIX-like, I guess?) and if they are not, we may have a
bigger issue.

(cherry picked from commit 7a7ecda4f1)
2019-01-26 16:46:03 +01:00
Salamandar
aaf5816695 Undo some (unnecessary) changes.
(cherry picked from commit fc657184a0)
2019-01-25 21:10:45 +01:00
Félix Piédallu
0436dd1cb7 (source modifs) Fix: Rename macros as it conflicts with Mingw headers.
* DATADIR -> GIMPDATADIR
* SYSCONFDIR -> GIMPSYSCONFDIR
* DATADIR -> SYSDATADIR (tools/)

(cherry picked from commit fc8303dd0a)
2019-01-25 21:10:41 +01:00
Ell
71fe5c00fd plug-ins: avoid running pygimp plug-ins derived from gimpplugin.plugin at each startup
When initializing a pygimp plug-in derived from gimpplugin.plugin,
only pass the plug-in's init() and quit() functions to gimp.main()
if the plug-in actually implements them, instead of passing the
default NOP versions.  This avoids plug-ins that don't implement
init() from being registered as having an init function, causing
them to be run at each startup.

(cherry picked from commit 9851bc8962)
2019-01-25 04:34:27 -05:00
sabri ünal
9c6c064356 Typo
(cherry picked from commit 43fb9242ca)
2019-01-24 23:33:34 +01:00
Jehan
8729f9a662 plug-ins: clean the new Spyrogimp, rename it and remove old version...
... from menus.
The script-fu version is still available through pdb (for scripts) and
even in the action search. But in menus, only the new Python version
will be shown. Also update the description and name of the old version
to make clear it is deprecated in favor of the new plug-in.
Finally rename the new version to simply "plug-in-spyrogimp" (dropping
the "-plus" part as we should consider it as a replacement rather than
as another plug-in, which the "plus" would imply). Anyway the old one
was called "script-fu-spyrogimp", so there is no name clash.

While at it, do some trailing whitespace cleaning in the new plug-in.
2019-01-24 01:05:02 +01:00
Elad Shahar
529583430d plug-ins: Spyrogimp plugin rewrite.
Comment by reviewer (Jehan):

This was submitted through gimp-developer mailing list, by the same
author as the original Spyrogimp in script-fu, but this time in Python.

It does more than the original plug-in, with some automatic preview (by
drawing directly on a temporary layer, not as a GEGL preview), and using
the current tool options (current brush, etc.). The new API is similar
yet different. The much evolved possibilities makes that I don't think
it is worth trying to map 1-1 the new API to the old one, so I just let
the old plug-in next to the new one, with a different name.

Note finally that the author also contributed a new Spyrograph operation
to GEGL, yet with the comment: "The GEGL spyrograph operation is very
basic, and untested from gimp. I intend to keep developing it, since I
thought that on-canvas interaction would be very user-friendly. However,
I am not sure I will be able to get it work in a way that makes the
on-canvas interaction interactive enough.

Even if I do, it will not do what the Python plugin can do. It will be
much more basic."

So let's just integrate this evolved version of Spyrogimp for now. :-)
See: https://mail.gnome.org/archives/gimp-developer-list/2018-September/msg00008.html
2019-01-24 00:31:15 +01:00
sabri ünal
e67d6752e8 Odd ` characters corrected as '.
(cherry picked from commit 76302b6634)
2019-01-16 12:40:58 +01:00
Jehan
78392316db Issue #2786: a few string issues.
Several en_GB to en_US.

Also "Show a preview of the transform_grided image". "grided" should be
"gridded", but I also have a problem with the underscore. Should it be
"transform-gridded"? Even so, does it really make sense?
I chose to just read "Show a preview of the transformed image", which I
think is simpler and the most understandable (we don't need to leak the
implementation with a transform grid into the human read text IMO). If
anyone think that was not the right choice, feel free to propose
otherwise.
Thanks to Bruce Cowan for noticing these.

(cherry picked from commit f9c170dfbd)
2019-01-12 18:04:55 +01:00
Michael Natterer
44fd7157b6 plug-ins: s/g_printf/g_printerr/ in sgi.c 2019-01-07 00:48:43 +01:00
Michael Natterer
c924d60ea6 Issue #1793 - Move Guillotine tool to a different position in menus...
...(and rename it)

Move it into the "Crop" group of the image menu and call it "Slice
Using Guides".

(cherry picked from commit 5fffadba54)
2019-01-05 14:58:18 +01:00
Michael Natterer
30d5fb4851 Issue #2260 - "Selection to Path Advanced Settings" dialog not scrollable
Put the entire dialog content into a scrolled window.

(cherry picked from commit 99764000be)
2019-01-05 14:26:24 +01:00
gaaned92
422486409a Issue #2716 - Windows: Rawtherapee plugin cannot be installed
On Windows, prevent RawTherapee from opening a console window

(cherry picked from commit 9e82ace409)
2019-01-03 14:12:48 +01:00
Jehan
582caf5a4a Issue #2611: Cannot open certain .pdf files in GIMP.
I am unsure of the problem, but it is fixed by using
poppler_document_new_from_gfile() instead of giving the contents of a
GMappedFile to poppler_document_new_from_data().
Using GFile is anyway usually prefered so I don't dig up more and just
make this change.

(cherry picked from commit a89e503054)
2019-01-02 22:58:56 +01:00
Jehan
d75a4615bd plug-ins: a lot of coding style cleanup in file-dds.
Still a lot more to do but pushing WIP to not have it wasted if more
commits come in from others.
Also got rid of some global variables.

(cherry picked from commit ff2d22d915)
2019-01-02 21:49:34 +01:00
Michael Natterer
ffbe7282be Issue #2617 - Export to C image artifacts
As correctly spotted by Royce Pipkins, the buffer for the drawable's
pixel lines was too small.

Also fix the plug-in to hardcode "R'G'B'[A] u8" so it won't misbehave
on high bit-depth images, and make it work on all sorts of drawables,
not only "RGB*" (it will still always export RGB images).

(cherry picked from commit 74c9d835e8)
2019-01-02 21:29:18 +01:00
Jehan
188c82ddc8 plug-ins: "Export as DDS" is translatable.
Thanks to Piotr Drąg for raising my overlooking this.

(cherry picked from commit d1de204dbc)
2019-01-02 20:48:38 +01:00
Jehan
c8b663e1b3 plug-ins: get rid of "Show this dialog" checkbox in file-dds.
None of our load plug-ins have such a checkbox, so this is not
consistent. Moreover one you uncheck it, you just can't get back the
dialog until next GIMP restart. That's very bad usability.

(cherry picked from commit 948608e658)
2019-01-02 19:37:59 +01:00
Jehan
80667aa73f plug-ins: s/Save as DDS/Export as DDS/
Let's make the GUI title consistent with our naming.

(cherry picked from commit 7e68aa37c1)
2019-01-02 19:17:22 +01:00
Jehan
4c4c54af2d plug-ins: fix a few more warnings.
There are still a bunch of warnings, especially regarding usage of
GtkTable, GtkMisc and some unused functions.

(cherry picked from commit 8f49fad3da)
2019-01-02 18:55:24 +01:00
Jehan
a6385fa096 plug-ins: make the file-dds plug-in load correctly.
This commit fixes the following error:

> attempted to install a procedure with a full menu path as menu label,
> this is not supported any longer.

Instead, if we want new items in menu, we should use
gimp_plugin_menu_register(). I add the calls, yet comment them out,
since I don't think we want these various conversion calls into the
provided filters. The proper way for data conversion should be through
babl/GEGL.

(cherry picked from commit 67a80c8667)
2019-01-02 18:55:23 +01:00
Jehan
4c8f8f45c0 plug-ins: make file-dds compile.
This is still very broken and it doesn't load well. But at least it
compiles!
All build errors (and a few warnings though not all) fixed.

(cherry picked from commit df8a20956b)
2019-01-02 18:55:23 +01:00
Alexandre Prokoudine
91c6f27cf2 file-dds: mark some user-vsible messages for translation, expose them to PO files
Unfortunately, no items of comboboxes are currently translatble
due to the way the code is written.

(cherry picked from commit 2f3504e06a)
2019-01-02 18:55:23 +01:00
Massimo Valentini
994368d68d file-dds: support for DXT2/DXT4, initial build and GEGL-related fixes
(cherry picked from commit d25348ca24)
2019-01-02 18:55:22 +01:00
Alexandre Prokoudine
369884cf9c file-dds: add original source code of the DDS plug-in
This is the code from the 'gimp-2.9' branch of the plug-in,
integrated into GIMP's build system.

(cherry picked from commit 79bc2dc1ef)
2019-01-02 18:54:52 +01:00