Commit Graph

55 Commits

Author SHA1 Message Date
b5e9bdb5df Issue #5735: incorrect condition because of missing parenthesis.
Also taking the opportunity to change the minimum size since I
apparently counted it wrong. The size always seems to be 46
starting from psp file-version 4 up to and including the current
version 13.

(cherry picked from commit 02bad34a41)
2020-10-08 18:41:37 -04:00
52b3194fd4 plug-ins: add support for indexed images in psp reader.
(cherry picked from commit bf66a07d20)
2020-09-12 12:07:42 +02:00
9ec44fd835 plug-ins: add support for grayscale images in psp reader.
(cherry picked from commit 2054f9f163)
2020-09-12 12:00:14 +02:00
712063a5eb plug-ins: add support for 16 bit integer images in psp reader.
(cherry picked from commit 7863d668e0)
2020-09-12 12:00:14 +02:00
256292d514 plug-ins: show descriptive layer type name for psp layers we can't convert.
(cherry picked from commit 84f06e976a)
2020-09-12 11:40:07 +02:00
8a85af71fc plug-ins: add defines for psp reader to include new things up to psp file version 8.
This also fixes the incorrect existing define for a mask layer.

(cherry picked from commit d7abb774a9)
2020-09-12 11:40:00 +02:00
6421a05549 plug-ins: replace a few occurrences of g_message with g_set_error in psp reader.
(cherry picked from commit 0a8f5b99f5)
2020-09-12 11:39:53 +02:00
987101df36 plug-ins: add most likely blend modes for certain psp blend modes.
This adds a blend mode for all known psp blend modes that were not
converted yet except for adjust.
I couldn't find any information about adjust and it's value of
255 suggests that it is not a normal blend mode.

(cherry picked from commit 19b261f3c6)
2020-09-01 12:47:09 -04:00
146a8d644b plug-ins: fix reading of psp tubes when psp file version >= 4.
(cherry picked from commit b968a93ab2)
2020-09-01 12:47:09 -04:00
94bea61b10 plug-ins: add support for reading raster layers of newer psp versions.
(cherry picked from commit fa40bc7)
2020-08-31 11:01:41 +00:00
7746e829c2 plug-ins: enable reading of psp images with file versions > 6.
(cherry picked from commit 85241a2)
2020-08-31 11:01:41 +00:00
a4344fff7b plug-ins: refactor reading of raster layer extension info for psp images.
(cherry picked from commit 0666f7a)
2020-08-31 11:01:41 +00:00
3765f80652 plug-ins: Take zero length layer names into account in psp reader.
(cherry picked from commit d7089c9)
2020-08-31 11:01:41 +00:00
63caa83eb7 plug-ins: fix reading layer names with high bit ASCII characters in psp files.
This also adds a few missing g_free when returning because of an error.

(cherry picked from commit 4ac373e84f)
2020-08-25 10:45:33 +02:00
cebd634ec1 plug-ins: fix wrong layer offset of psp layers.
(cherry picked from commit dc80c78a26)
2020-08-25 10:45:33 +02:00
2cc7f4b6bb plug-ins: improve psp image reader stability by always using the block/chunk length.
Starting from psp file version 4 the specification recommends to always use the
block/chunk length to determine the next part of the image. This way it is
possible to skip parts you don't know or don't care about or additions in
newer versions.
This change makes sure to always do this which fixes reading several images
which crashed the plug-in before.

Also only try to read layer data if it is a raster layer.

(cherry picked from commit 15ad952)
2020-08-20 18:53:34 -04:00
2ad03dc61c plug-ins: fix incorrect loading of PSP images with uncompressed channel data.
According to the PSP specifications "Each scanline in the image data is stored on a 4 byte boundary.	"
Based on all actual images I've seen this is incorrect. Possibly it is a leftover from an older specification.

(cherry picked from commit f4088adefa)
2020-08-08 16:24:37 +02:00
af9ccbbe4e plug-ins: fix reading of creator block data of PSP images.
Since string data in PSP images is not zero terminated
reading creator block data always failed.

(cherry picked from commit fcb9de07f6)
2020-08-08 16:24:30 +02:00
2dd2ba1bfb plug-ins: file-psp.c fix incompatible pointer type 2020-04-13 12:55:52 +00:00
a88c0ffb93 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:47:19 +02:00
877e79b935 plug-ins: properly propagate GError.
Some g_message() stay when they are used as debug or warning message
(without actually cancelling load action). But all fatal errors now use
g_set_error().
2017-12-21 21:47:25 +01:00
037cc8586b plug-ins: use g_set_error() instead of g_message().
Also simplifies a bit the check for PSP version support.
2017-12-21 20:32:17 +01:00
eb2980683e Bug 790853 - (CVE-2017-17787) heap overread in psp importer.
As any external data, we have to check that strings being read at fixed
length are properly nul-terminated.
2017-12-21 12:49:41 +01:00
28e95fbeb5 Bug 790849 - (CVE-2017-17789) CVE-2017-17789 Heap buffer overflow...
... in PSP importer.
Check if declared block length is valid (i.e. within the actual file)
before going further.
Consider the file as broken otherwise and fail loading it.
2017-12-20 16:44:20 +01:00
Ell
03756d0980 app: rename "Color (HSV) (legacy)" mode to "Color (HSL) (legacy)"
The color-space qualification is, in fact, a 2.9 thing, so there's no
historic reason to keep the wrong name for the legacy mode.
2017-03-16 06:23:30 -04:00
3cf423f0cd *: rename NORMAL to NORMAL_LEGACY and NORMAL_LINEAR to NORMAL
and make NORMAL_LEGACY immutable.
2017-02-26 16:26:34 +01:00
152adbb1bd Rename GIMP_LAYER_MODE_FOO_BROKEN to GIMP_LAYER_MODE_FOO_LEGACY
"Broken" sounds like it needs fixing, but it's legacy compat stuff
that will have to stay for all eternity.
2017-01-09 01:27:20 +01:00
66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
f5ecc53f3e Fix a lot of warnings all over the place
Deprecated stuff, unused variables. Includes parts of a patch from
Shlomi Fish from bug #768855.
2016-10-31 01:36:35 +01:00
ec27b539ea plug-ins: various s/save/export/ replacement on visible strings. 2016-02-16 02:35:43 +01:00
bc4cf9918f Bug 673501 - Issue with Overlay
GIMP's OVERLAY mode was identical to SOFTLIGHT. This commit fixes the
issue and introduces a NEW_OVERLAY mode and enum value.

- change gimp:overlay-mode to be a real (svg-ish) overlay mode
- when compositing, map OVERLAY to gimp:softlight-mode
- when compisiting, map NEW_OVERLAY to gimp:overlay-mode
- bump the XCF version when NEW_OVERLAY is used
- map OVERLAY to SOFTLIGHT when loading and saving XCF
- map OVERLAY to softlight in all PDB setters
- map OVERLAY to softlight when deserializing a GimpContext
- change all paint mode menus to show an entry for NEW_OVERLAY
  instead of OVERLAY
- change PSP, PSD and OpenRaster to use NEW_OVERLAY

These changes should (redundantly) make sure that no OVERLAY enum
value is used in the core any longer because it gets mapped to
SOFTLIGHT at all entry points, with the downside of introducing a
setter/getter asymmetry when OVERLAY was set in a PDB api.
2015-04-29 13:32:58 -04:00
03df8c6af4 plug-ins: pass the format's name again in calls to gimp_export_image()
and clean up the formatting of the call and the lines around it. Now
we can check the various (disabled) export options for regressions
again by changing a single line in gimp_export_image().
2013-11-10 00:18:48 +01:00
8db3b4312d Global EXIF -> Exif string change (official spelling) 2013-10-29 22:48:46 +01:00
264d09b417 Rename colour and greyscale to color and grayscale respectively 2013-06-06 23:26:16 +02:00
6b0d1038cc Bug 692641 - Various spelling fixes 2013-01-27 18:59:02 +01:00
8c72ad9bd7 plug-ins: port file-psp to GEGL 2012-11-19 00:10:17 +01:00
8a20035ea0 Bug 661313 - "None" string needs differentiation (message context)
Add translation context to all "None".
2011-11-16 23:13:03 +01:00
d881e40bb0 file-psp: Move vars to local blocks (much needed) 2011-10-12 19:24:09 +05:30
b6dd07821e file-psp: Remove redundant assignment 2011-10-12 19:20:56 +05:30
f657361db0 file-psp: fix overflow protection (CVE-2011-1782)
amends commit 48ec15890e, related to
CVE-2010-4543
2011-05-23 11:58:08 +02:00
8c4d99f883 Bug 645456 - Inconsistent window (role) naming scheme
Applied patch from Christoph Kappel which adds a "gimp-" prefix to all
plug-in dialog window roles.
2011-04-08 20:31:34 +02:00
87646e9ace libgimp: deprecate and rename the image parasite functions
in exactly the way the drawable functios were turned into item ones.
2011-03-08 13:19:21 +01:00
48ec15890e file-psp: fix for bogus input data. Fixes bug #639203 2011-02-14 21:46:45 +01:00
7666e5cf36 Fix memory and descriptor leaks 2010-11-12 21:56:17 +01:00
7a9793ba6e plug-ins: Use the correct enum value in file-psp 2010-10-08 22:56:53 +05:30
bbd7ec6b5c plug-ins: port from gimp_image_add_foo() to gimp_image_insert_foo()
I'm sure some plug-ins need to add their items *not* at the toplevel,
but since making plug-ins really tree-aware is a lot more work than
just fixing insert positions, I went for passing -1 as parent in
almost all cases. And because of laziness...
2010-09-06 11:40:46 +02:00
c6a2eaa5c4 plug-ins: use new item API instead of deprecated drawable API 2010-07-09 12:27:36 +02:00
19fe919dce plug-ins: Port file plug-ins to new export API 2009-07-21 16:03:58 +02:00
e805cb0cf4 Use gtk_dialog_get_content_area() instead of dialog->vbox 2009-07-15 18:57:12 +02:00
7976f21a35 plug-ins: Remove unused read_extended_data_block() in file-psd.c 2009-07-14 12:27:58 +02:00