Commit Graph

7659 Commits

Author SHA1 Message Date
Jehan dc069e424a plug-ins: coding-style fix, adding comments and removing unused var.
Commits 8d4642f and daa5611 reviewed. I was only unsured on usage of
header vs EOF palette as well as the non-B&W monochrome palette since we
don't find a single authoritative spec. Nevertheless the implementer has
good argumentation so let's go with this. Simply I add some comments
about these 2 points in the code, just in case for future references.
2017-06-09 13:17:07 +02:00
Nikc M daa5611e6f Fix for Bug 159947 - saving 1bpp PCX files
+Allows user to save indexed 1bpp and 4bpp PCX files automatically,
depending on the number of colors used.

+Creates a general function with parameters for both bpp and # of
planes, to handle more PCX file types (1bpp, 2planes; 1bpp, 2planes;
4bpp, 1plane).

+Removes assumption when loading colormap that 1bpp files are black &
white only; loads both colors from PCX palette header instead.

https://bugzilla.gnome.org/show_bug.cgi?id=159947
2017-06-09 13:13:09 +02:00
Nikc M 8d4642f4ba Bug 159947 - saving 1bpp PCX Files
Allows saving 1bpp and 4bpp indexed PCX files based on number of colors
used in image. Also provides ability to load additional PCX formats:
2bpp, 2 planes 1bpp, 3 planes 1bpp, 4bpp.
2017-06-09 13:13:09 +02:00
Edward E d2de5a0c30 Bug 555777 - Export to MNG animation fails
Fix calling convention for libmng functions in file-mng plug-in.
2017-06-04 12:30:24 +02:00
Simen Heggestøyl 8412192f85 Bug 783386 - Circuit filter broken
Fix an error in the circuit filter introduced in
1ce7fc6c77.

It's gimp-drawable-desaturate not gimp-desaturate-drawable.
2017-06-04 00:09:41 +02:00
Jehan 731cc47a22 plug-ins: pyconsole.py must be included in the distribution.
By default, _DATA files are not included. Hence `make distcheck` fails
with:
*** No rule to make target 'pyconsole.py', needed by 'all-am'.
Let's add it back.
2017-06-01 01:12:09 +02:00
Michael Natterer 320a3db133 plug-in: add python-console.py back to EXTRA_DIST
and change variable names to be like the ones of the main python
plug-in dir.
2017-05-31 23:48:22 +02:00
Michael Natterer 894845fe43 plug-ins: actually use the remembered profile_policy in screenshot
Copy and paste coding made the default value the selected one in the
"Color Profile" frame, not the value from ScreenshotValues.
2017-05-30 22:22:40 +02:00
Michael Natterer 6918b4b773 plug-ins: set the GimpColorConfig on all script-fu color buttons 2017-05-28 16:43:00 +02:00
Jehan e985110250 plug-ins: install python-console plug-in in its own subdirectory.
As a consequence of commit efae55a, plug-ins should not install
data/library files alongside on the root plug-ins/ directory. If they
have such files, they should create a subdirectory named as the entry
point file. Obviously we should be the first to follow this guideline.
We had one such plug-in: python-console.py, which is importing
pyconsole.py. Let's have both these files under
plug-ins/python-console/.
2017-05-26 00:15:26 +02:00
Kristian Rietveld 002e7fc98f plug-ins: darktable: implement support for locating darktable on macOS 2017-05-15 14:37:05 +02:00
Kristian Rietveld 8199003afa plug-ins: darktable: have separate function to obtain executable name 2017-05-15 14:37:05 +02:00
Michael Natterer 7f33edea1b app, libgimp: allow to register more than one MIME type per procedure
GIMP will always use the first one from the list, but at least now
there is a way to register variants.
2017-05-04 23:22:37 +02:00
Michael Natterer 560340e8d6 app, pdb, libgimp: make the raw image importer configurable
Add "import-raw-plug-in" to gimprc, and a new procedure
gimp_register_file_handler_raw(). On startup, remove all load
procedures that are marked as "handles raw" but are not implemented by
the configured plug-in. Add the list of available plug-ins to prefs ->
import/export. Register all file-darktable procedures as handling raw.
2017-05-04 20:38:58 +02:00
Michael Natterer 3bb1f09dce Bug 780698 - 32-bit integer FITS files won't open
Make sure integers don't depend on the hardware (don't use "long", use
"gint32" instead).
2017-04-30 19:43:21 +02:00
Michael Natterer d0c1ae9b57 plug-ins: minor formatting stuff in wavelet-decompose 2017-04-21 22:27:18 -03:00
Thomas Manni f981f83fbc plug-ins: replace deprecated enum values in py-slice plug-in 2017-04-18 06:28:03 +02:00
Tobias Stoeckmann 13ed12d2b3 plug-ins: avoid OOB write on malicious GIH files.
Integer overflows allow out of boundary writes while reading GIH files.

The checks are copied from file-gbr.c. In turn, the necessary gsize
casts are added in file-gbr.c, too. These are important on 64 bit
systems. Without these casts, the precision of the calculation is still
32 bit, allowing overflows.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2017-04-08 22:31:50 +02:00
Tobias Stoeckmann 10f12bdcbd PCX: Avoid segmentation fault with invalid file.
If a PCX file contains a bytesperline entry which is too small, it is
possible to trigger an out of boundary read, which can lead to a
segmentation fault.

The bytesperline validation is incomplete. While checking if enough
bytes per line exist, the integer truncation during the division must be
taken into account.

An example would be a 1x1 PCX file with a bpp of 1 (monochrome). The
current check allows a bytesperline field of 0, which in turn would lead
to a 0 byte allocation in load_1. Yet, the code would access index 0.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2017-04-08 17:25:07 +02:00
Tobias Stoeckmann 20c9b60487 PCX: Stop parsing an invalid file early on.
If either width or height is 0, gimp won't process the PCX file.
Instead, a bunch of error messages are printed.

It's nicer to quit parsing the file early on with a good error message
which is straight to the point instead.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
2017-04-08 11:59:32 +02:00
Jehan bc344a9991 Bug 750180 - Fix different ways of writing Plug-in Plug-In Plugin.
It was agreed that we should write "plug-in" consistently. Only possibly
user-visible strings were updated.
Thanks to scootergrisen for a first patch which could not make it
after changing decision on the canonical writing.
2017-03-21 17:52:22 +01:00
Ell e69e84c7c7 plug-ins: s/HSV_COLOR_LEGACY/HSL_COLOR_LEGACY/ in file-openraster.py
Missed it when renaming the mode.
2017-03-16 09:48:39 -04: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
Ell b22c09e7b7 app: implement color-erase mode as a GimpOperationLayerMode blendfun
... and get rid of the dedicated op.  This gives us support for all
the blend/composite options for this mode.

Rename COLOR_ERASE to COLOR_ERASE_LEGACY, with perceptual blending/
compositing and immutable everything, and add a new COLOR_ERASE
mode, defaulting to linear blending/compositing, with mutable
everything.  Modify affected code.
2017-03-08 14:13:51 -05:00
Michael Natterer dda54c1df8 Deprecate stock items for good and change all icon defines to GIMP_ICON_*
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html

Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
2017-03-05 16:01:59 +01:00
Michael Natterer 5e666113b1 plug-ins: replace deprecated enum values in script-fu scripts 2017-02-26 21:30:11 +01:00
Michael Natterer fb3d1e4508 app, pdb, libgimp: rename values of enum GimpConvertPaletteType 2017-02-26 20:55:00 +01:00
Michael Natterer ed1ab140fb app, pdb, libgimp: rename values of enum GimpConvertDitherType
being exported to libgimp, and having a non-exported value, this is a
horrible mess like with GimpLayerMode, but at least the cruft value
names are deprecated now.
2017-02-26 20:13:09 +01:00
Michael Natterer 3cf423f0cd *: rename NORMAL to NORMAL_LEGACY and NORMAL_LINEAR to NORMAL
and make NORMAL_LEGACY immutable.
2017-02-26 16:26:34 +01:00
Daniel P. Berrange ad9ccc4b58 Bug 778990 - PNM file plugin doesn't preserve 16-bit image precision
Save PNM in 16-bit format with max value of 65536 if the
image precision is not U8.
2017-02-22 12:52:33 +01:00
Daniel P. Berrange c87543aaac Bug 778990 - PNM file plugin doesn't preserve 16-bit image precision
Create a U16 precision image if loading a PNM file with
a max value greater than 255
2017-02-22 12:52:03 +01:00
Michael Natterer 63f1ec4101 app, libgimp, plug-ins: remove the _LINEAR layer mode variants
Missing: PDB API to set the various sub-modes we now have for layer modes.
2017-02-19 23:15:59 +01:00
Juan Palacios 9b636ff798 Bug 778571 - Add support to import/export layer color tags from/to psd files
Except GIMP's "brown" tag which is not supported by PS.
2017-02-13 21:30:26 +01:00
Alexandre Prokoudine c3c895cd49 Slightly normalize wavelet-decompose metadata 2017-02-13 04:17:00 +03:00
Michael Natterer 801bd8fb3f plug-ins: get rid of icons in dialog buttons (use labels not stock IDs) 2017-02-12 16:18:54 +01:00
Alexandre Prokoudine b3e4588a5f psd: add support for loading and exporting Hard Mix layer mode
Also remove warning from the Vivid Light loader, we are good now.
2017-02-05 16:36:41 +03:00
Alexandre Prokoudine 832c79e8d8 Activate exporting more layer modes from XCF to PSD 2017-02-04 18:43:34 +03:00
Alexandre Prokoudine 2bce09ff9b Add Linear Burn to PSD exporting, update the list of XCF layer modes 2017-02-04 18:03:59 +03:00
Alexandre Prokoudine 023cdd159e Update XCF to PSD layer mode mappings 2017-02-04 17:55:18 +03:00
Alexandre Prokoudine 0584fc0e45 psd: add stubs for Darker Color and Lighter Color layer modes 2017-02-04 17:28:13 +03:00
Alexandre Prokoudine b471c90aee Update PSD to GIMP layer mode mappings 2017-02-04 17:22:07 +03:00
Jehan dd4848e680 plug-ins: headers only needed with the Sendmail-email plugin. 2017-02-02 21:41:15 +01:00
Michael Natterer c6f00eb87f app, menus, plug-ins: add new menu Color -> Tone Mapping
Move all related GEGL filters and the retinex plug-in there..
2017-02-02 20:42:58 +01:00
Michael Natterer 393ce1d53b plug-ins: use the new composite mode API in file-psd
No clue if this is right.
2017-02-02 00:40:37 +01:00
Jehan f43092cbf5 plug-ins: make screenshot-win32 compile again.
Commit e518b97 broke Win32 compilation with a non-defined variable
"monitor". I made a dirty "fix" by using shootvals->monitor.
Apparently, seeing previous comment, that is probably not the right
value but Mitch is on it and I leave him work it out.
At least now it builds.
2017-02-01 18:52:14 +01:00
Jehan a02a597788 plug-ins: minor tab cleanup. 2017-02-01 04:53:31 +01:00
Jehan 08e8c0e4f8 app, plug-ins: move the locale processing code in the core.
The colon-separated list used in the plugin originally comes from
gimp_help_get_locales() anyway. My previous code was using different
lists of locales in different places, which was inconsistent.
2017-02-01 03:10:13 +01:00
Jehan 65e8521402 plug-ins: better parse locales.
Be a little cleverer about what locale we care about in the context of
the help system. Variants and encoding in particular are of no interest
to us.
Let's also always add a base language (like "en" for "en_GB") rather
than fully trusting g_get_language_names() since it seems to return
funny results on some platform.
Finally check for duplicates before adding to language list.
2017-02-01 01:59:45 +01:00
Jehan 53465942f8 Bug 777754 - Failure to recognise installed help system.
It seems that the Windows platform could sometimes return locales in the
form en-GB (so an IETF language tag, I guess) instead of a POSIX locale.
This little hack should take care of the easy cases until we get a
better and generic fix.
2017-02-01 01:59:45 +01:00
Jehan d967219925 plug-ins: tab cleaning. 2017-02-01 01:59:45 +01:00