Commit Graph

8800 Commits

Author SHA1 Message Date
Elad Shahar 0a611bd8ad Issue #5069: Gfig uses the Stroke color for filling instead of the fill color 2020-07-12 21:43:44 +02:00
Ell 7f39be86de plug-ins: add option to crop layers to image bounds when exporting TIFF
In file-tiff, add an option to crop the layers to the image bounds
when exporting individual layers (using GIMP_EXPORT_NEEDS_CROP
added in the previous commit), since TIFF has no concept of global
image bounds otherwise.  Cropping is enabled by default.
2020-06-25 18:35:09 +03:00
Ell 536bf771b7 Issue #5274 - Exporting as TIFF fails for layers with a negative offset
When exporting a TIFF file without merging the image, make sure non
of the exported layers has a negative offset, by offsetting all the
layers as necessary.  TIFF doesn't support negative page offsets,
giving an error in libtiff.
2020-06-25 18:20:44 +03:00
Ell 46cb5a5e79 plug-ins: fix last commit for PLANARCONFIG == SEPARATE 2020-06-24 15:51:56 +03:00
Ell 8b9819339d Issue #5275 - TIFF files with signed-int samples are misinterpreted as unsigned
When loading a TIFF file with signed-int samples, convert the
samples to unsigned-int by offsetting them to the unsigned range,
instead of misinterpreting them as unsigned values.
2020-06-24 15:22:29 +03:00
Yuri Chornoivan 4510e75864 Fix minor typo: entred -> entered 2020-06-18 09:09:55 +00:00
Michael Natterer 45ce68fe15 plug-ins: change the "compose-type" default values to upper case
just for consistency.
2020-06-17 21:56:31 +02:00
Michael Natterer 4e9227e5d3 plug-ins: make sure "decompose-type" in decompose.c is upperacse
because the string combo box in the dialog is case sensitive.
2020-06-17 21:56:31 +02:00
Michael Natterer 54b5faeefb plug-ins: port file-xmc.c to GimpProcedureConfig and prop widgets 2020-06-17 21:56:31 +02:00
Michael Natterer 0d56bbb745 plug-ins: change "comment" arguments to "gimp-comment"
so they continue to be handled automatically.
2020-06-17 21:56:31 +02:00
Ell 6a01bf2df2 Issue #5219 - Color>Info>Export histogram counts pixels twice
gimp_histogram() takes an inclusive range -- the plug-in has been
counting non-zero pixels twice.
2020-06-14 17:04:30 +03:00
Michael Natterer b070abe5bf plug-ins: port decompose to GimpProcedureConfig 2020-06-08 22:59:04 +02:00
PhotonQyv 5d412088af plug-ins: fix spyro-plus after Gimp/GimpUi split.
Since the Python bindings for Gimp has been split into Gimp and GimpUi
bindings this plug-in needs a slight tweak to still work correctly.
2020-06-08 20:38:53 +00:00
PhotonQyv c16e310c36 Corrected code to work with newer split Gimp and GimpUi bindings. 2020-06-08 20:09:21 +00:00
Yuri Chornoivan a9421be414 Fix minor typo: pisels -> pixels 2020-06-08 19:48:10 +00:00
Michael Natterer 9054ab5dc5 plug-ins: port file-tiff-save to GimpProcedureConfig
Implement the GUI using prop widgets and remove the glade file.
Change loading to attach the right parasite so the save procedure
finds the fake "last values".
2020-06-08 20:42:36 +02:00
PhotonQyv a9a61d963d Add url to code so that Source button actually does what it is supposed to do. 2020-06-04 21:08:14 +00:00
Ell 86569b9ae3 plug-ins: in twain, unify 8- and 16-bit data transfer 2020-06-04 22:01:39 +03:00
Ell 6d4712edb9 plug-ins: another fix to last commit 2020-06-04 21:00:51 +03:00
Ell f4058d47a2 plug-ins: fix last commit 2020-06-04 20:47:34 +03:00
Ell 00e1172a54 Issue #4941 - TWAIN 16-bit greyscale/rgb scan always loaded as 8-bit
Simplify data transfer in the twain plug-in, and add support for
16-bit RGB/grayscale images.
2020-06-04 20:42:03 +03:00
Ell 6def9e59fb plug-ins: fix last twain-plug-in commit 2020-06-04 01:14:33 +03:00
Ell 9a1d43c978 Issue #4210 - GIMP reports errors on scanning ...
... since GEGLification of the twain plug-in (2.10.14 and later
versions)

In the data-transfer functions, allocate a temporary buffer for the
converted data on each call using the current chunk size, instead
of reusing the buffer allocated on the first chunk.  This allows
for different chunks sizes across calls.
2020-06-03 16:58:51 +03:00
Niels De Graef acf50009f8 Allow building vala plugins 2020-05-26 17:52:52 +00:00
Jehan b00bb346a9 plug-ins: more complete naming for Python|Script-Fu consoles.
Just "Console" is enough in the context of menus with submenu hierarchy,
but when accessing directly the feature (with Action Search for
instance), a more accurate name is nicer. It avoids to have to check
what is what in the tooltip text.
2020-05-26 14:32:11 +02:00
Jehan ab172872ce plug-ins: fix python-console after GimpUi instrospection separation.
Patch by darix!
2020-05-26 14:15:17 +02:00
Michael Schumacher 8bf8eb9dc0 plug-ins: use G_GOFFSET_FORMAT to fix a long int vs. long long int format warning 2020-05-26 12:12:10 +02:00
Jehan 5498adf50a app, libgimp, pdb: color picker multi-layer aware.
Color picking on a single layer still works as it used to. On multiple
layer, it will now pick on the composited color, similarly to sample
merged if only selected layers were made visible.

The PDB/libgimp function gimp_image_pick_color() is also updated to work
on multiple drawables too, giving the same ability to plug-ins (the only
call to this function in core plug-ins have been updated).
2020-05-17 18:57:32 +02:00
Jehan 98603c69c9 app, libgimp, pdb: "edit-copy" multi-layer aware.
When several layers are selected, select their render, similar to how
"edit-copy-visible" would have copied an image with only these layers
made visible.
Also apply the same logics to PDB function gimp_edit_copy() which can
now be used on several drawables at once.
2020-05-17 18:57:32 +02:00
Jehan d3139e0f7c app: support saving/exporting with multi-selection.
This commit just changes our saving API (i.e. the GimpSaveProcedure
class) to take an array of drawables as argument instead of a single
drawable.

It actually doesn't matter much for exporting as the whole API seems
more or less bogus there and all formats plug-ins mostly care only
whether they will merge/flatten all visible layers (the selected ones
don't really matter) or if the format supports layers of some sort. It
may be worth later strengthening a bit this whole logics, and maybe
allow partial exports for instance.

As for saving, it was not even looking at the passed GimpDrawable either
and was simply re-querying the active layer anyway.
Note that I don't implement the multi-selection saving in XCF yet in
this commit. I only updated the API. The reason is that the current
commit won't be backportable to gimp-2-10 because it is an API break. On
the other hand, the code to save multi-selection can still be backported
even though the save() API will only pass a single drawable (as I said
anyway, this argument was mostly bogus until now, hence it doesn't
matter much for 2.10 logics).
2020-05-17 18:32:16 +02:00
Niels De Graef b14b93de14 Split GIR into Gimp-3.0 and GimpUi-3.0
Fixes https://gitlab.gnome.org/GNOME/gimp/-/issues/4065
2020-05-15 07:45:25 +00:00
Simon Budig 4394b92c71 Issue #1439: reverse the construction of the "selection to path" plugin. 2020-05-15 02:46:49 +02:00
Niels De Graef 5992a42231 gimpthrobber: Get rid of g_type_class_add_private()
It's deprecated.
2020-05-12 21:35:54 +02:00
Niels De Graef ae34e778fc meson: Use libgimp(ui)_dep in plug-ins meson files
This gives a big cleanup in the meson.build files of the plug-ins.

It's also quite a bit more maintainable, since anything that changes in
libgimp's dependencies, linkage, ... doesn't have to be copy-pasted into
each plug-in.
2020-05-11 07:01:37 +02:00
T Collins f00df8f773 Update ddswrite.c 2020-05-06 13:58:28 +00:00
Elad Shahar 93602a3973 Issue #4326 - Add visual tab to spyrogimp plugin
Add visual tab to spyrogimp plugin for a more intuitive, visual
way of specifying the spyrograph pattern.
In addition, fix using the selection as the fixed gear, and add
option to save the pattern to a path.
2020-05-05 13:29:09 +03:00
luz.paz 36f620012d Fix typos
Found via codespell v1.17.0.dev0  
```
codespell -q 3 -S ./ChangeLog*,*.po,./.git,./NEWS* -L als,ang,ba,chello,daa,doubleclick,foto,hist,iff,inport,klass,mut,nd,ower,paeth,params,pard,pevent,sinc,thru,tim,uint
```
2020-05-04 08:55:48 -04:00
Niels De Graef cf41d1fdf8 colorselector: Rename signal emitters
The GIR parser is giving warnings because both e.g. a signal, a
corresponding vfunc and a method emitting it are named
"channel_changed", which can and will give issues in some bindings.

The easiest option is to follow the general convention of starting the
signal emitters with `emit_`, which also makes clear the intention of
the method.
2020-05-03 23:23:44 +02:00
Michael Natterer f3f8d3a54e Issue #3405 - Color component decompose crash for CMY
Remove the "CMY" model from compose and decompose, it's gone from
babl. Also fix decomposing to CMYK by using the right component names.
2020-05-02 21:17:20 +02:00
Michael Natterer 9adf2d19f8 Issue #3949 - Image Map plug-in selects wrong areas
Fix one of the issues spotted by Massimo: in right_intersect() it must
be "dy > 0" not "dy > y".
2020-05-02 20:16:04 +02:00
Michael Natterer 452924dbe9 Issue #5009 - Possible array overrun in d_draw_ellipse
Change while() to go from 0..360 instead of 0..361 so the code passes
automated tests. The code never ran into this situation but the change
is a small improvement anyway.
2020-05-02 16:52:18 +02:00
Michael Natterer 97e0322ebb Issue #5010 - Setting twice value pcvals.paper_invert in paper_store
Remove identical duplicated line.
2020-05-01 22:49:47 +02:00
Jehan 2678bafca2 Issue #5002: compare pointer to NULL, not 0.
This is a remnant from the old API where we were using item IDs.
2020-04-28 16:38:24 +02:00
Ell 2d4de85fe3 plug-ins: in file-psd, use normal channel order
For some reason we reverse the channel order when loading/saving a
PSD file.  This doesn't seem to be necessary, and leads to a
reversed channel order across GIMP/Photoshop.  Simply use the
normal channel order instead.
2020-04-26 23:38:25 +03:00
Ell 281188e169 Issue #189 - Store channel colors when saving as PSD
In file-psd, write a DisplayInfo image resource with the color/
opacity of all channels.
2020-04-26 23:19:22 +03:00
Ell ac19f6413b plug-ins: in file-psd, fix indentation in psd-save.c 2020-04-26 23:16:05 +03:00
Ell 953a3ad479 plug-ins: in file-psd, remove unused member of DisplayInfoNew 2020-04-26 23:14:55 +03:00
Ell 251ce5126e plug-ins: in file-psd, fix u8 channel format
In file-psd, use a non-linear channel format when the image
precision is u8 non-linear, as per gimp_image_get_channel_format().
2020-04-26 23:14:52 +03:00
Jehan c280cb9da7 plug-ins: fix various other warnings on the Windows build CI.
1 > warning: "_WIN32_WINNT" redefined
2 > pointer targets in passing argument 2 of 'send' differ in signedness
3 > passing argument 4 of 'setsockopt' from incompatible pointer type

For the signedness/type issues, I just casted to (void *) which was the
expected type for these parameter on the Linux API anyway. As for
Windows API (which was expecting char* for these various API), the
compiler just does the cast itself from void* without complaining
anymore.
2020-04-17 14:42:25 +02:00
Jehan e854de73ee plug-ins: fix signedness warning with different expectation Win/Linux.
On Windows, accept() wants an int for addrlen but on Linux, it wants a
socklen_t which is an unsigned int. So we can't just switch to gint as
proposed in !232 (if we do so, the signedness warning now happens on the
Linux build instead of the Windows one).

Fortunately it looks like socklen_t is actually typedef-ed to int in
Windows headers. So let's just use this type, which is much more proper
anyway as this variable is only used in functions which want this type
on Linux.

Fixes:

> warning: pointer targets in passing argument 3 of 'accept' differ in signedness
2020-04-17 14:18:53 +02:00