Commit Graph

8398 Commits

Author SHA1 Message Date
Michael Natterer 1900384cc0 plug-ins: port gradient-flare to GEGL, stupid 8-bit only 2019-07-06 15:14:55 +02:00
Michael Natterer 96e7a791f8 plug-ins: some WIP undeprecating curve-bend
better push before it rots... totally unfinished but works.
2019-07-06 13:11:41 +02:00
Michael Natterer 738c035839 plug-ins: fix two harmless compiler warnings 2019-07-02 15:22:52 +02:00
Jehan f4af95ab95 plug-ins: some cleaning in HEIF plug-in.
heif_chroma_interleaved_24|32bit are deprecated values replaced by
heif_chroma_interleaved_RGB(A).

Also we allocated a HEIF context twice (i.e. leaking it).

Finally it's better to initialize heif_image and heif_encoder variables
to NULL because these may not be set if creation functions fail (and
it's better to fail with NULL than with garbled unset contents).
2019-07-01 19:28:43 +02:00
Jehan 7f76430090 plug-ins: improve a bit HEIF export dialog.
- Add the quality slider in a frame under the "lossless" checkbox,
  making the relationship more obvious.
- Make the whole frame contents insensitive when "lossless" is checked
  and not just the slider. Once again, it makes the relationship more
  obvious.
- Add a mnemonic to the "Lossless" checkbox and "Quality" slider.
2019-07-01 16:57:22 +02:00
Jehan dfd79ad79b plug-ins: add a "Save color profile" checkbox in HEIF export. 2019-07-01 16:39:13 +02:00
Jehan 5d6baf5f85 plug-ins: implement our profile export policy for HEIF.
Same as WebP or jpeg: follow explicitly assigned profile TRC; convert
default (non-assigned) profile to sRGB, except if work format is 8-bit
linear.
2019-07-01 15:36:59 +02:00
Jehan 1370112ac2 plug-ins: improved space invasion in HEIF export. 2019-07-01 00:35:49 +02:00
Jehan ee9be7fe39 plug-ins: space invasion in WebP export. 2019-07-01 00:13:18 +02:00
Massimo Valentini 6c033317ac issue 3082: screenshot plugin crashes when cancelling...
...the interactive capture dialogue
2019-06-29 18:10:23 +02:00
Jehan 667b4d71c9 libgimp, plug-ins: get rid of GIMP_EXPORT_NEEDS_OPAQUE_LAYERS capacity.
This new capacity was created just 3 commits ago (9933f46f85).
The point was that the real fix is to remove the implication
HANDLE_LAYERS => HANDLE_ALPHA, but this breaks public API behavior,
which is why I didn't go with it.

Still it just felt wrong to add a NEEP_OPAQUE capability when it should
be the same thing as not setting HANDLE_ALPHA. After discussion on IRC,
we decided that this implication was basically a bug, and since in all
core plug-ins, when HANDLE_LAYERS was set, we were also setting
HANDLE_ALPHA, no core plug-in code even has to be changed. As for
third-party plug-ins, let's assume that none has been relying on this
wrong assumption.
2019-06-29 17:08:06 +02:00
Jehan 7a73e9e76c plug-ins: set "Save layers" toggle unsensitive for single-layer images. 2019-06-29 14:57:04 +02:00
Jehan f9fd818c3d Issue #3553: Cannot export TIF as G3/G4 fax compression.
G3/G4 compression does not support transparency, yet in multi-layer
export, gimp_export_image() capability GIMP_EXPORT_CAN_HANDLE_LAYERS
implied GIMP_EXPORT_CAN_HANDLE_ALPHA. I guess multi-layer TIFF is more
for multi-page (at least with G3/G4 which is apparently a fax format, so
it makes sense) than actual multi-layer.

So I use the new GIMP_EXPORT_NEEDS_OPAQUE_LAYERS capability from
previous commit for this particular use case of export layers + G3/G4
compression.

Also it is better to run gimp_export_image() *after* the option dialog,
as we do for other formats, with variable capabilities depending on
which options was chosen, instead of running it before then after
merging layers when user chose not to export layers. This is duplicating
the purpose of gimp_export_image().
2019-06-29 14:33:03 +02:00
Michael Natterer 267d925025 plug-ins: port nl-filter to GEGL, 8 bit only 2019-06-28 19:25:31 +02:00
Michael Natterer c1f2973232 plug-ins: port film to GEGL 2019-06-28 18:40:41 +02:00
Michael Natterer a3e2dda8c7 plug-ins: port fractal-explorer to GEGL, 8 bit only 2019-06-28 13:03:45 +02:00
Michael Natterer be411a58a7 plug-ins: port flame to GEGL, 8-bit only 2019-06-28 12:37:26 +02:00
Michael Natterer 6078312bf2 plug-ins: replace gimp_datafiles_read_directories() by GFileEnumerator
in fractal-explorer and gradient-flare.
2019-06-28 11:49:58 +02:00
Jehan 1a1623784f plug-ins: plug-ins: get space from the profile in PNG export too. 2019-06-27 16:20:53 +02:00
Jehan b0bb456563 plug-ins: get the export space from the profile. 2019-06-27 15:57:00 +02:00
Michael Natterer d5ac62c6eb pygimp: argh... 2019-06-27 13:46:55 +02:00
Michael Natterer 61fe89ad02 pygimp: replace gimp_drawable_get_tile2() by gimp_drawable_get_tile() 2019-06-27 13:45:09 +02:00
Michael Natterer 4c7a43d234 plug-ins: replace gimp_drawable_get_color_uchar() by manual code 2019-06-27 13:37:04 +02:00
Michael Natterer 4c4abf7fc4 plug-ins: port blinds to GEGL
Found another unfinished result of boredom from years ago.
Stupid 8-bit only port.
2019-06-27 13:23:31 +02:00
Michael Natterer 57ac8cfa7e plug-ins: port jigsaw to GEGL
Found in my stashes, I have no idea why I even bothered but it just
needed a minor fix to work, so here we go. Stupid port that always
uses 8 bit and kills higher bit depths.
2019-06-26 17:26:53 +02:00
Michael Natterer 06e0ca8ef0 plug-ins: fix comment typo in file-png 2019-06-26 17:26:06 +02:00
Michael Natterer b07975aa88 plug-ins: cleanup, copyright headers, formatting in the openexr-wrapper 2019-06-26 16:56:12 +02:00
Michael Natterer f7413d70dd plug-ins: improve JPEG and EXR comment validation
If the comment doesn't UTF-8 validate, leave valid UTF-8 at the
beginning intact. Also fix character range comparison to use guchar
instead of gchar
2019-06-26 16:51:26 +02:00
Michael Natterer e2bacf918c plug-ins: improve/fix metadata handling in file-exr
Use gimp_image_metadata_load_finish() and pass the right flags
depending on whether comment and profile were loaded. Also, set the
profile before creating the layer so its space is correct
automatically.
2019-06-25 17:55:49 +02:00
Michael Natterer 4c41f185e2 plug-ins: space invade file-jpeg
Use the drawable's space for the load/save formats to avoid unwanted
color conversions. Also cleaned up the loading code a bit, it was
doing weird duplicated stuff for the preview and !preview cases.
2019-06-25 14:05:30 +02:00
Michael Natterer c356564984 plug-ins: space invade file-heif
Use the drawable's space for the load/save formats, to avoid unwanted
color conversions.
2019-06-25 13:53:44 +02:00
Michael Natterer 62f010df90 configure.ac, plug-ins: make file-heif build with older libheif again
Lower requirement to 1.3.2 and check for 1.4.0 separately. Put color
profile code in #ifdef HAVE_LIBHEIF_1_4_0.
2019-06-25 13:20:07 +02:00
Jehan 3604e8e7ad Issue #3560: "Screenshot delay: __ seconds" item lacks mnemonic. 2019-06-24 12:00:51 +02:00
Michael Natterer a08293dc74 Issue #3532 - Wrong color profile on nikon taken photos, it's...
...always AdobeRGB!

Change all file plug-ins to never call gimp_image_metadata_load_finish()
with the GIMP_METADATA_LOAD_COLORSPACE when they loaded a color profile.

This keeps gimp_image_metadata_load_finish() from assigning a profile
from DCT even if the loaded profile was GIMP's built-in sRGB.
2019-06-20 18:08:59 +02:00
Jehan 3c0f7f00ba plug-ins: avoid converting TIFF extra channels for 8-bit non-linear too.
Complete commit ac8ad13f0a.
Channels are Y' on 8-bit non-linear images. So to avoid data conversion,
this is the only case where we want to consider TIFF channels to be Y'
as well.
2019-06-18 18:16:25 +02:00
Jehan ac8ad13f0a plug-ins: avoid converting TIFF channels.
In GIMP, our channels (the ones from Channels dock) are always linear,
and don't follow the image/profile TRC. When a TIFF image has extra
channels (no semantic attached), we probably want to load the channel
as-is, without converting the values. So let's assume that TIFF extra
samples with "Unspecified data" in it are linear data. This way, their
values goes copied straight into a channel.
2019-06-18 15:56:16 +02:00
Jehan 348c9c22d0 plug-ins: fix tiff load of grayscale images without alpha.
Though we were checking the profile, both code paths were importing
from non-linear data.
2019-06-17 21:47:59 +02:00
Jehan 7cf98231f1 Issue #3493: GIMP changes R-channel, when it should not.
Instead of treating any unspecified TIFF channel as non-premultiplied
alpha, let's now ask the user (in non-interactive case, we continue
defaulting to non-premultiplied channel and outputing a message). The 3
choices are: premultiplied, non-premultiplied (which is the default so
you can just hit Enter and get same result as previously) and channel.

It's still not perfect as it still assumes that an alpha channel will
necessarily be the first extra channel (though the spec does not mandate
such assumption). Let's say for now that it is enough. Using extra
channels for the alpha channel only is most likely the most common usage
(actually the spec only has specific types for such usage).
2019-06-17 17:25:06 +02:00
Michael Natterer 6740c0af92 Issue #3264 - Wrong colors from opening and exporting non-sRGB tiffs...
...and pngs

Fix PNG import and export:

When importing, set the color profile on the image *before* creating
the layer, so its buffer has the right format with space.

When exporting, create the saving babl format with the layer's space
so no color conversion happens when reading the layer's pixels.
2019-06-16 14:52:48 +02:00
Jehan de866d8815 plug-ins: get rid of compilation warning.
Note that I am using twice TIFFErrorHandler type. This is because
TIFFWarningHandler does not exist, despite what the docs says and
upstream code actually uses twice the same handler type.
2019-06-12 12:54:37 +02:00
Michael Natterer 5d95040a9d Issue #3264 - Wrong colors from opening and exporting non-sRGB tiffs...
...and pngs

Fix yesterday's fix and pippin's fix to not move lines around that
should be together (never move around code between testing and
pushing)...
2019-06-12 10:55:58 +02:00
Øyvind Kolås cdfca0b420 plug-ins: tiff-load initialize a variable before using it
Initialize channel[0].buffer before using it, as a response to the following
critical warning reported in issue #3264 about it being NULL:

(file-tiff:1074): GEGL-CRITICAL **: 17:10:57.175: gegl_buffer_get_format: assertion 'buffer' failed
2019-06-11 23:49:56 +02:00
Michael Natterer 84ffcddaef Issue #3264 - Wrong colors from opening and exporting non-sRGB tiffs...
...and pngs

Create formats with the drawable's space so no conversions happen when
reading/writing the drawable's buffer. Original patches from Massimo.
2019-06-11 21:53:54 +02:00
Jehan b090bc5213 Issue #3493: GIMP changes R-channel, when it should not.
Our TIFF loading code was not taking into account the case when extra
channels were stored in the TIFF file while ExtraSamples field is not
set. Yet as a side effect of a later channel count, we were setting
`alpha` to TRUE while `save_transp_pixels` was left uninitialized (hence
undefined behavior).

For now let's make sure we have no undefined behavior. When the
ExtraSamples field is missing and at least one extra channel is stored,
we will consider the first extra channel as non-premultiplied alpha
(this is also what we were doing when ExtraSamples was set to
"Unspecified data" and apparently according to Massimo, it would be a
common behavior in other software).

Note that it is an improvement from previous code (no undefined
behaviour anymore, instead we handle explicitly the TIFF error). Yet
this is not perfect yet. Ideally we should pop-up a dialog asking what
to do with this extra channel: either open as a channel (no alpha), or
as premultiplied or non-premultiplied alpha.
2019-06-11 15:33:15 +02:00
Jehan 24ed5870ad plug-ins: PNG export TRC chosen similarly to TIFF.
While we tend to default to sRGB for 8-bit max formats (such as JPEG or
WebP) when no explicitly-assigned profile was set, there is no need to
do so for PNG too. Indeed since we have the ability to export 16-bit
PNG, let's consider this is ok to export 16-bit linear data when writing
GIMP's default linear profile.

Moreover let's follow the profile's (fallback to storage's) TRC also
when exporting to a specific precision (as chosen manually in the
dialog), not only when sticking to "Automatic", unless we are downsizing
a high bit depth work image to 8-bit without a manually assigned profile
(the only case we forcefully export as sRGB data, hence convert the
profile if linear storage).
2019-06-07 18:49:18 +02:00
Jehan 8cd3f5a853 plug-ins: simplify code a bit by removing useless variable. 2019-06-07 18:12:58 +02:00
Jehan 0461022198 plug-ins: add the 8-bit linear with no assigned profile exception...
... in JPEG export.
Same as the WebP export, which is quite similar (8-bit max format), when
no profile was explicitly set, we want to convert any data from storage
format to non-linear (unlike when exporting high bit depth formats, such
as TIFF).
We only make an exception for 8-bit linear. This commit adds this
exception.
2019-06-06 16:31:30 +02:00
Jehan 26ba915ca5 plug-ins: remove the "Advanced Options" expander in WebP export dialog.
Similarly to other export dialogs, we don't consider anymore metadata or
profile writing as being advanced options. Since these were the only
options shown in our current WebP export dialog, I removed the expander
altogether and moved everything out.

See also commit 540cfa9611.
2019-06-06 16:06:59 +02:00
Jehan 6712228e5e plug-ins: fix profile writing in save_animation() in WebP export.
Profile and output linearity decision was doubled as save_layer() and
save_animation() and I realize that I forgot to update the
save_animation() one in earlier commits.

To avoid code copy-paste and divergence, I added an internal
webp_decide_output() function which I use in both aforementionned calls.
2019-06-06 16:03:18 +02:00
Jehan 96e37dfdaf plug-ins: add a "Save color profile" checkbox in WebP export.
Unlike most other formats, it didn't have one yet!
2019-06-06 15:29:07 +02:00
Jehan 2a1eabc177 plug-ins: improve decision on exported data format in Webp.
Same as other formats, we make sure that an explicitly set profile TRC
is always followed. When no profile is set, we always export as sRGB
when there is precision downsizing to avoid shadow posterization, since
WebP stores 8-bit max per channel (as far as I know, or at least as far
as we implemented it in our plug-in).
We only take the storage format into account when it is 8-bit linear
with profile export. In such case, we avoid conversion from 8-bit linear
to 8-bit sRGB.

This is different to TIFF export for instance, where we fallback on
following storage format TRC as we are able to export all sort of
precisions, hence with minimum quality loss.
2019-06-06 15:22:58 +02:00
Jehan 8d9e70011d plug-ins: improve decision of exported data format in TIFF export.
Same as we did for PNG and JPEG, we want to always export data with the
TRC of a profile manually assigned, and in particular NOT the curve of
the storage in GIMP (i.e. you may work on 32-bit linear, yet if you
assigned a sRGB TRC profile, this is what you should export). The
storage format will only dictate the exported data TRC when writing out
the default profile (i.e. no explicit profile assignement).
As a last case, when no profile is saved, we always export as sRGB.

As for the export precision, we always follow the storage one's, except
sometimes for 8-bit images. We promote 8-bit images to 16-bit if and
only if the storage does not match the export data linearity, to avoid
too much quality loss during format conversion.
2019-06-06 12:48:38 +02:00
Ell 8831ef2ea0 plug-ins: in file-tiff, don't leak image when not saving layers
In file-tiff, when not saving layers, avoid duplicating the image
to create the merged version if it's already been duplicated, and
make sure to delete the duplicated image otherwise.
2019-06-03 12:43:18 -04:00
Michael Natterer 0be3fce4fb Issue #3132 - Missing accelerator on "Export Image as JPEG" dialog
Change toggle button label to "Save color _profile".
2019-05-28 15:05:05 +02:00
Michael Natterer 0710051e2b app, plug-ins: make sure a GIH brush's spacing is preserved
across load and save, by introducing a gimp-brush-pipe-spacing
parasite.
2019-05-28 00:25:47 +02:00
Jehan cf37d1ae56 plug-ins: follow the assigned profile TRC in PNG export.
Similar to JPEG export (commit c5f7bac2ba)
as discussed with Ell. GIMP should follow and save as-is any *assigned*
profile. We only make a decision about whether to convert from storage
precision to another format when the profile is the default GIMP one.

Picked from commit 72c5d24fe9.
Some changes may have to happen later on the master code as the space
invasion changes a bit how default profiles are handled.
2019-05-26 14:17:41 +02:00
Michael Natterer 2a48a5f868 plug-ins: big formatting and indentation cleanup in file-dds
Also change the license to GPL 3 or later, like all other files.
2019-05-23 14:34:00 +02:00
Sabri Ünal d7a4d5c6a8 Issue #3140 - Export as DDS dialog does not have an Export button 2019-05-10 14:23:25 +00:00
Jehan 417f2c873f plug-ins: follow the assigned profile TRC.
GIMP should not convert assigned profile to sRGB just because we stored
as linear on the XCF. In other words, we should not look at the image
precision to decide whether to export as linear (previously only 8-bit
linear images), but at the profile TRC. There are basically 3 cases:
(1) We don't save a profile, then convert to sRGB whatever the source
precision (because readers would assume sRGB for a no-profile jpeg).
(2) We save the default profiles: convert to sRGB because it's usually
a better choice for 8-bit formats and even working at 32-bit float
*linear* doesn't mean you want to export as 8-bit int *linear*. As the
image creator made no explicit export choice, we make an acceptable
default one.
(3) We save an explicitly assigned profile: keep the profile TRC, don't
convert!

Note that this apparently won't work perfectly right now, as GIMP
replaces the original TRC with the linear default TRC when converting to
linear. So the expected TRC is lost in such case when you have not
explicitly reset the correct profile. Yet this is on GIMP side and this
part of the issue should be fixed with the space invasion merge. For
now, this is how the plug-in should work.

This is based on my late discussion with Ell. Please everyone, and Ell
especially, review! :-)

(cherry picked from commit c5f7bac2ba)
2019-05-06 14:35:55 +09:00
Jehan 062195117c plug-ins: fix TIFF linear export.
The export code was checking the existence of a profile variable which
was never set. In other words, it seems we were always converting TIFF
pixels to non-linear, even when we were also exporting a linear profile.

Note that is not useful anymore to check profile existence as we now use
the effective profile (which always exists). So we just have to check if
the "save profile" option is on.
2019-04-25 20:23:06 +09:00
Sabri Ünal cf892ba2f0 Issue #3220 - "How to Use Dialogs" does not open any page.
(cherry picked from commit 45784e9f50)
2019-04-24 23:32:57 +02:00
Tobias Ellinghaus 5ddfe36d96
plug-ins: Move layer option up in TIFF dialog
This was requested by mitch.
2019-04-23 15:57:34 +02:00
Tobias Ellinghaus 7584969453
plug-ins: Add layer support to TIFF writing 2019-04-16 10:04:16 +02:00
Jehan b9458f8a6e plug-ins: export linear WebP if and only if the work image was 8-bit...
... linear itself AND if we export the profile.
Implement similar logics to WebP export as I did to JPEG in my previous
commit.
2019-04-15 23:52:53 +02:00
Jehan 5f4cf53519 plug-ins: export linear JPEG if and only if the work image was 8-bit...
... linear itself AND if we export the profile.

In most cases we want to save 8-bit image formats (here JPEG) as
non-linear, even though the work image may have been linear itself (yet
with higher bit depth). The reasons are shadow posterization on low bit
depth, and the fact that JPEG compression was designed for perceptually
uniform RGB and introduces shadow artifacts with linear RGB (see #1070,
message by Elle Stone). The only exception is when the creator was
working explicitly on 8-bit linear (not higher bit depth) AND if we
export the profile (otherwise most loaders around assume sRGB). In such
a case, let's consider the creator knows what one is doing and keep the
exported image linear.

Similar logics is already used in PNG exporter (though a bit of a
variant since PNG supports 16-bit so it is instead: 8-bit linear without
profile is promoted to 16-bit non-linear, and kept 8-bit linear with
profile).
2019-04-15 22:56:38 +02:00
Jehan 7a4b313b12 Issue #3253: exporting to webp from 32-bit float linear image...
... produces incorrect result.
Similar to previous fixes to JPEG and PNG exporters. Here WebP always
export 8-bit per channel colors, so let's always keep it non-linear.
Simply when the original data was linear, if we save the profile,
convert it to sRGB before exporting.
2019-04-14 22:18:36 +02:00
Jehan c5fae74ac1 Issue #3193: Wrong colors after exporting 8bpc RGB png from 32f...
... linear XCF.
When choosing a specific pixel format (other than "Automatic"), we
always export as non-linear. Therefore if we were going to save a linear
profile, make sure we also convert it to sRGB too.
2019-04-12 14:33:19 +02:00
Jehan 8594275bb7 Issue #1070: exporting to jpeg from 32-bit float linear image...
... produces jpeg in linear color space.
The problem was that we were anyway always exporting to non-linear while
attaching a linear profile. A first approach would have been to export
in linear instead when the work image is linear, as proposed by mitch in
a first version of the patch. Yet as Elle Stone notes, it is not a great
idea to export 8-bit images as linear.
Instead let's continue to always export as non-linear, as we were
already doing. Yet when we also save a profile, and this one was
originally linear, let's convert it to sRGB TRC before exporting.
2019-04-12 12:57:18 +02:00
Jehan b1133ef866 plug-ins: updating deprecated enum names from libheif. 2019-04-01 15:38:27 +02:00
Jehan 22e14e0b9b Issue #3164: HEIC doesnt have color profile.
Since this requires libheif 1.4.0, released end of February 2019, this
commit should not go into the gimp-2-10 branch right now.
2019-04-01 15:29:58 +02:00
Jehan 0b68ce8182 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.
2019-03-19 12:46:12 +01:00
Jehan ed3bcf248e plug-ins: remove old spyrogimp.
Spyrogimp has been rewritten in Python with more features.

Note: this commit should not be backported to gimp-2-10 since we will
keep the old plug-in around (in case its API is used by older scripts in
particular). But let's turn over a new leaf with future GIMP 3 and only
keep the new plug-in.
2019-03-18 15:53:04 +01:00
Jehan ae8bf15758 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.

(copied from 18a2f576bb instead of
cherry-picking since differences in the ui file was making
cherry-picking over-complicated for just one line)
2019-03-11 13:10:07 +01:00
Ell 8954d1f386 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:28:52 -05:00
Jehan 0a1e688c1f 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.

(cherry picked from commit a0a7ead13f)
2019-03-09 12:21:21 +01:00
Jehan 0129d8e262 Issue #102: TIFF plugin doesn't handle indexed images with alpha...
... channel.

(cherry picked from commit 72e86545f0)
2019-03-09 12:14:49 +01:00
Jehan 3384bdf6bc Issue #1256: Import damages colormap numbering.
Do not remove fully transparent colors from the PNG palette.

(cherry picked from commit 7812aced5d)
2019-03-08 15:18:44 +01:00
Michael Natterer cc7e07fecb 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.
2019-03-03 19:56:04 +01:00
Ell 11defa4271 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.
2019-02-22 12:02:09 -05:00
Michael Natterer 52adaa1963 app, plug-ins: move file-gih-load from the file-gih plug-in to the core 2019-02-19 23:41:34 +01:00
Ell b5a34c3190 plug-ins: in file-dds, rename endian.h to endian_rw.h ...
... to avoid clashing with the system <endian.h>

Thanks Andrea!
2019-02-17 13:35:16 -05:00
Michael Natterer 90164c4951 app, plug-ins: move brush (gbr) saving to the core
just the export logic remains in the plug-in, just as for patterns.
2019-02-16 19:01:33 +01:00
Michael Natterer b71ebcea6d plug-ins: forward the error message if file-pat-save-internal fails 2019-02-16 18:59:01 +01:00
Jehan 35eff00e2e Issue #2961: minor coding style fix.
Missing space, and anyway let's use named parameters, which makes the
code better self-documented.
2019-02-14 12:09:29 +01:00
Veerasamy Sevagen c7d5438b49 Update gimpfu.py 2019-02-13 15:38:29 +00:00
Veerasamy Sevagen 3b818f6a9b Update plug-ins/pygimp/gimpfu.py 2019-02-13 15:38:29 +00:00
Veerasamy Sevagen cdd686f752 Update plug-ins/pygimp/gimpui.py 2019-02-13 15:38:29 +00:00
Veerasamy Sevagen b44c2e9352 Update plug-ins/pygimp/gimpfu.py 2019-02-13 15:38:29 +00:00
Veerasamy Sevagen 582801ccc5 Setting the FileChooserbutton to a fixed width. 2019-02-13 15:38:29 +00:00
Michael Natterer 52b1348f3d plug-ins: remove stuff that is no longer needed from file-pat 2019-02-12 21:38:22 +01:00
Michael Natterer b29ecfb5da 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.
2019-02-12 21:27:13 +01:00
Michael Natterer 410ffc435e app: move file-pat-load from the file-pat plug-in to the core 2019-02-11 18:35:07 +01:00
Michael Natterer a4e77e57f6 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.
2019-02-11 12:51:31 +01:00
sabri ünal 4b3b22812b Typo - Put a blank after the fullstop. 2019-02-09 12:06:09 +00:00
Elad Shahar f6e4145756 Add i18n support for python spyrogimp plugin 2019-02-01 07:41:19 -05:00
Ell 12dbd4aee2 plug-ins: in pygimp/plug-ins/Makefile.am, simplify plug-in copy recipe 2019-02-01 07:41:19 -05:00
Ell 95044d86b3 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.
2019-02-01 04:33:55 -05:00
Ell bcd9f55526 plug-ins: in pygimp/plug-ins/Makesfile.am, use tab-width of 8
... like the rest of our makefiles.
2019-02-01 04:33:54 -05:00
Michael Natterer 0fa98d4849 plug-ins: add .gitignore file to file-dds 2019-01-30 18:48:28 +01:00
Ell b295a33aaf 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 :)
2019-01-26 16:02:21 -05:00
Jehan 7a7ecda4f1 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.
2019-01-26 16:42:15 +01:00
Salamandar fc657184a0 Undo some (unnecessary) changes. 2019-01-25 19:08:28 +00:00
Félix Piédallu fc8303dd0a (source modifs) Fix: Rename macros as it conflicts with Mingw headers.
* DATADIR -> GIMPDATADIR
* SYSCONFDIR -> GIMPSYSCONFDIR
* DATADIR -> SYSDATADIR (tools/)
2019-01-25 19:08:28 +00:00
Ell 9851bc8962 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.
2019-01-25 04:34:22 -05:00
sabri ünal 43fb9242ca Typo 2019-01-24 22:11:31 +00:00
Jehan e91028df2f 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.

(cherry picked from commit 8729f9a662)
2019-01-24 01:15:41 +01:00
Elad Shahar a702c6a327 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

(cherry picked from commit 529583430d)
2019-01-24 01:15:40 +01:00
Michael Natterer 08de4bf0af plug-ins: small formatting fix in selection-to-path-dialog.c
so 2.10 and master are the same.
2019-01-17 09:37:13 +01:00
sabri ünal 76302b6634 Odd ` characters corrected as '. 2019-01-16 09:02:14 +00:00
Jehan f9c170dfbd 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.
2019-01-12 17:22:03 +01:00
Michael Natterer 5fffadba54 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".
2019-01-05 14:56:24 +01:00
Michael Natterer 99764000be Issue #2260 - "Selection to Path Advanced Settings" dialog not scrollable
Put the entire dialog content into a scrolled window.
2019-01-05 14:16:55 +01:00
Michael Natterer 08a31a01f8 plug-ins: set a minimum height on the unit editor's scrolled window 2019-01-05 14:15:01 +01:00
gaaned92 9e82ace409 Issue #2716 - Windows: Rawtherapee plugin cannot be installed
On Windows, prevent RawTherapee from opening a console window
2019-01-03 14:10:27 +01:00
Jehan a89e503054 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.
2019-01-02 22:54:21 +01:00
Jehan ff2d22d915 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.
2019-01-02 21:41:19 +01:00
Michael Natterer 74c9d835e8 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).
2019-01-02 21:28:24 +01:00
Jehan d1de204dbc plug-ins: "Export as DDS" is translatable.
Thanks to Piotr Drąg for raising my overlooking this.
2019-01-02 20:40:50 +01:00
Jehan 948608e658 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.
2019-01-02 19:34:40 +01:00
Jehan 7e68aa37c1 plug-ins: s/Save as DDS/Export as DDS/
Let's make the GUI title consistent with our naming.
2019-01-02 19:14:30 +01:00
Jehan 8f49fad3da plug-ins: fix a few more warnings.
There are still a bunch of warnings, especially regarding usage of
GtkTable, GtkMisc and some unused functions.
2019-01-02 18:33:46 +01:00
Jehan 67a80c8667 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.
2019-01-02 18:33:46 +01:00
Jehan df8a20956b 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.
2019-01-02 18:33:46 +01:00
Alexandre Prokoudine 2f3504e06a 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.
2019-01-02 18:33:46 +01:00
Massimo Valentini d25348ca24 file-dds: support for DXT2/DXT4, initial build and GEGL-related fixes 2019-01-02 18:33:46 +01:00
Alexandre Prokoudine 79bc2dc1ef 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.
2019-01-02 18:33:46 +01:00
Michael Natterer aa02d619f7 plug-ins: in file-png, pass a more correct SAVE_COLOR_PROFILE flag...
...to gimp_image_metadata_save_finish(). Set it based on whether the
profile was actually saved, not if we only intended to save it.
2019-01-02 13:18:32 +01:00
Ell 192bc9536c plug-ins: in image-map, fix spin-scale adjustment
Fix deprecated use of non-zero page size for a spin-button
GtkAdjustment, and increase the page increment.
2019-01-01 07:52:36 -05:00
Alexandre Prokoudine 27aa87ba8e Improve pixel format choice UI in PNG exporting options
The former UI did not conform to what we do elsewhere.
Use label + combo now.
2018-12-07 12:25:02 +03:00
Michael Natterer a822603807 plug-ins: port the GIF plug-in's UI file to GTK+ 3.x
and clean it up so things are properly packed again.
2018-12-05 12:35:02 +01:00
Michael Natterer c667fdc5c0 Integrate the logic of profile saving with metadata saving
Add flag GIMP_METADATA_SAVE_COLOR_PROFILE to GimpMetadataSaveFlags and
initialize it from gimp_export_color_profile() in
gimp_image_metadata_save_prepare().

Adapt all plug-ins to use the bit from the suggested export flags and
pass the actually used value back to
gimp_image_metadata_save_finish().

This changes no behavior at all but creates hooks on the libgimp side
that are called with the context of an image before and after the
actual export, which might become useful later. Also, consistency
is good even though the color profile is not strictly "metadata".
2018-12-04 17:28:24 +01:00
Michael Natterer 7f9379cb32 Issue #1297 - Unhide the items hidden in the Advanced drop-down file...
...export dialogs

Remove the "Advanced" expander and have all options in plain sight.

Issue #701: Add a "Save color profile" toggle and always honor it.
2018-12-03 19:41:56 +01:00
Michael Natterer a35b243f9b plug-ins: always save the color profile in file-psd
by using gimp_image_get_effective_color_profile() instead of just
_get_color_profile(). Don't look at the preference setting because PSD
should behave more like "save" than "export" and save everything.
2018-12-03 19:24:52 +01:00
Michael Natterer 7ed93452e8 Issue #1297 - Unhide the items hidden in the Advanced drop-down file...
...export dialogs

Remove the "Advanced" expander from the PNG export GUI and generally
clean up the dialog layout.

Issue #701: Add a "Save color profile" toggle and always honor it.
2018-12-03 12:55:04 +01:00
Michael Natterer 540cfa9611 Issue #1297 - Unhide the items hidden in the Advanced drop-down file...
...export dialogs

Move most stuff out of the "Advanced" expander, only nerdish encoding
options are left there.

Issue #701: Add a "Save color profile" toggle which honors the default
value configured in preferences and always saves the profile when
enabled.
2018-12-03 12:19:41 +01:00
Ell 053e5edc93 libgimpcolor, app, modules, plug-ins: remove GEGL_ITERATOR2 define
... it's no longer needed, since GEGL commit
gegl@9dcd2cde63f95a080bf16a58c10e9ffbdd99aace.

Partially reverts commits:

6fca9959c7
cc10af72cc
49c53568d7
8edbc0d491
29f63616d2
3a2014984d
ee48ec6877
4165a315d5
764085278f
b7633c722e
6ab12061b7
754a3c5b18
22b4b647bd
55b3438328
c6d23add65
f03a84d607
822f9f0d2b
95358ca1fa
cdda37f4ee
41e8035635
6761da42b2
fb5d7832a8
97ed7817d8
46e9036578
ea9c5e6a49
24fbdfb591
beb4ecb238
4b77831e03
fcf113a39c
567ffe94ff
2018-12-02 11:15:37 -05:00
Skal e9200d2c00 webpmux: fix memory leak by calling WebPMuxDelete() 2018-11-28 13:37:39 +01:00
Jehan 66ec467217 plug-ins: make various usage of g_file_replace() safer.
As I did on app/, finalizing an output stream also implicitly flushes
and closes it. Hence if an export ended with an error, we'd end up with
incomplete data file (possibly overwriting a previously exported image).
Only 2 plug-ins I haven't fixed yet are file-tiff-io and file-gif-save.
The later one don't even clean up its memory (which somehow is good here
as at least the output stream is never finalized hence sane files are
not overwritten in case of errors). As for the former (TIFF plug-in), it
doesn't even seem to have any error control AFAICS, apart from printing
error messages on standard error output.
2018-11-27 12:41:22 +01:00
Jehan 7ce5abd35e plug-ins: remove now useless code under GTK_CHECK_VERSION(3, 0, 0).
Grepping for other uses of GTK_CHECK_VERSION(), this was the only
remaining one, which is obviously useless now on the master branch.
2018-11-24 11:38:45 +01:00
Jehan afe1de950f Issue #2501: Confusing wording in "Export Image as PDF" dialog.
Nothing said what was going to be the order of the page, except by
testing. Now there will be an explicit text, which will be automatically
updated when checking the "reverse order" box.
2018-11-14 13:37:42 +01:00
Alexandre Prokoudine 85e6700aac Help menu: various updates
Commented out the inactive plug-ins registry: no point linking to a dead page.

Added links to the roadmap page, main wiki page, and the bug tracker. Placed
the link to the bug tracker one level up from '<Image>/Help/GIMP Online'
to make it more visible.
2018-11-14 09:17:21 +00:00
Jehan ba98b98f58 Issue #2431: After coloring a selection and exporting to PDF, file...
... only shows the color (and nothing else) when "Convert bitmaps to
vector graphics where possible" was set.

This is because gimp_drawable_histogram() only checks selected pixels.
So let's make sure we work on a duplicate of the image so that we can
safely remove the selection before processing the export.

(cherry picked from commit 679e341285)
2018-11-08 15:26:34 +01:00
Jehan 5d319b77bf Issue #2160: Exporting to PCX results in a warped file.
Add line data padding when necessary.
Additionally I realize we should convert to little-endian after checking
the bytesperline oddness (this bug was most likely unnoticed until now
as most desktop proc are little endian now anyway).
2018-11-01 22:22:40 +01:00
Tobias Ellinghaus bfcb7fc593
file-pnm: Remove clamping when loading PFM files 2018-10-30 13:37:07 +01:00
Michael Natterer 2880f08044 plug-ins: fix some new strncpy() warnings 2018-10-22 15:41:18 +02:00
Michael Natterer 582c692010 plug-ins: make curve-bend build again, and undeprecate it a bit 2018-10-22 15:04:07 +02:00
Michael Natterer 6bb8c74a46 plug-ins: kill GtkAlignment in all plug-ins which are currently built 2018-10-22 14:47:54 +02:00
Michael Natterer 07f5527998 plug-ins: stop using gimp_rgb_to_hsl_int(), gimp_hsl_to_rgb_int()
and gimp_rgb_to_l_int() cruft functions.
2018-10-22 13:17:43 +02:00
Michael Natterer befe80bd08 plug-ins: don't use gimp_rgb_to_hsv_int() and gimp_hsv_to_rgb_int()
Use the default APIs using GimpRGB and GimpHSV structs instead.

This also changes/fixes the colors in all affected plug-ins which were
broken/restricted in hue range ever since the _int() functions were
changed from a 0..255 to 0..360 hue range 15 years ago in commit
d93c2f61c8.
2018-10-22 12:50:11 +02:00
Michael Natterer dac5be6108 plug-ins: kill GtkAlignment in cml-explorer 2018-10-20 13:55:42 +02:00
Michael Natterer 0b99fc8194 plug-ins, pdb: remove the fractal-trace plug-in and add a PDB compat proc 2018-10-20 13:05:17 +02:00
Michael Natterer 643004af06 plug-ins: kill some deprecated GtkAlignments 2018-10-20 12:37:12 +02:00
Michael Natterer f5f3573337 plug-ins: kill deprecated GtkAlignment in file-xmc 2018-10-20 01:22:11 +02:00
luz.paz ac282f2045 Misc. typos
Found via `codespell`
2018-10-19 15:30:27 +00:00
Josef Ridky 2987f012f9 Issue #2087 - Issues discovered by coverity scan
Add missing fclose invocations and fix copy-paste issue.

This issues has been discovered by coverity scan proceeded by Red Hat.

Fixed some mistakes in the patch and added more fclose() (Mitch)

(cherry picked from commit 56c8f8320d)
2018-10-19 11:26:41 +02:00
Ell 5e6e979a00 Issue #2339 - Error while executing script-fu-ripply-anim
In ripply-anim.scm, correct the edge-type argument passed to
plug-in-displace.
2018-10-09 19:31:23 -04:00
ONO Yoshio 3c92b5e00b plug-ins: fix a datasourcetype does not shown in metadata-editor.
Tag of DigitalSourceType has 5 entries, but the combobox shown
only 4 items.
2018-10-02 08:43:56 +09:00
Jehan cb892aa0e6 plug-ins: add more generated files in .gitignore. 2018-09-29 23:16:40 +02:00
Sergio Jiménez Herena 1e7d714f0a plug-ins: pygimp: Add autogenerated python files to .gitignore
(cherry picked from commit 0839a55d51)
2018-09-29 23:08:31 +02:00
Michal 04688c3111 Use the "with" keyword when dealing with file objects
According to: https://docs.python.org/3.6/tutorial/inputoutput.html
2018-09-29 20:25:40 +00:00
Michal 263b4722ca Use assignment operator 2018-09-29 20:25:40 +00:00
Michal 6090fd654f "Generator Expressions" improvements
https://www.python.org/dev/peps/pep-0289/
2018-09-29 20:25:40 +00:00
Michal 82e59a951d Use list comprehensions
https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions
2018-09-29 20:25:40 +00:00
Michal 09d1a3c82f Comparision to None should be done with "is" or "is not"
https://www.python.org/dev/peps/pep-0008/#programming-recommendations
2018-09-29 20:25:40 +00:00
Ell 9a2999a553 plug-ins: in script-fu, don't query PDB procedures' info on startup
script-fu used to query the information of every PDB procedure on
startup, in order to get the number of parameters for each
procedure.  This was done so that nullary procedures were defined
in such a way as to accept (and ignore) any number of arguments
(and at least one of the scripts we ship relies on this behavior).
However, this requires expensive back-and-forth communication with
the main GIMP process, which notable slowed down script-fu's
startup, and had a non-negligible impact on GIMP's startup time.

Instead, avoid querying procedure information, and implement the
special behavior for nullary procedures at call time.  We do this
by defining, in addition to the "strict" gimp-proc-db-call
procedure, a "permissive" -gimp-proc-db-call internal procedure,
and using the latter to call the predefined PDB procedures.
2018-09-26 14:41:12 -04:00
Simon Mueller 6a5023a38a Issue #2179: Get rid of the win32_use_hkcu flag.
Simply always check HKCU first. If that lookup did not yield any result,
fall back to HKLM.
2018-09-19 15:01:46 +02:00
luz.paz 386587736f Misc. typo fixes
Found via `codespell`
2018-09-16 18:49:18 -04:00
Jehan 64b00b5c7f plug-ins: add the "msf1" brand for HEIF files.
After Dirk Farin had another look in the specs, it turns out that "mif1"
is actually allowed as major brand for HEIF. Also adding "msf1" which is
the equivalent for image sequences.
2018-09-16 19:21:14 +02:00
Jehan 4ad3993eca Issue #2209: more accurate magic for HEIF files.
Just looking for "ftyp" would also match other ISOBMFF files (.mov or
.mp4 files for instance). These are the possible 4-byte "brand" code
which can follow "ftyp", as listed by Dirk Farin from libheif.

I add the "mif1" brand, as I encountered some files using this magic
(even though this should normally not be valid apparently, yet the file
loaded fine in GIMP).

This is not perfect as the standard allows potentially very big box
headers, in which case 8 bytes (the "largesize" slot) may be inserted
between "ftyp" and the brand, as I understand it. But this is actually
unlikely enough to probably never happen (the compatible brands list
would have to be huuuge, as it looks like this is the only extendable
part in a ftyp box). So let's assume this just never happens.

See also: https://github.com/strukturag/libheif/issues/83
2018-09-16 16:52:21 +02:00
Jehan d738d2f645 Issue #2209: HEIF: Invalid input: No 'ftyp' box.
Adding a magic number for HEIC/HEIF, which would allow to discard
obvious non-HEIC images even with the wrong extension.

Note: it looks like this magic number would also match more generically
other ISO base media file format (ISOBMFF) formats, like .mov or .mp4
files. I am enquiring for better magic but for now, this is better than
nothing.
2018-09-14 17:57:15 +02:00
Øyvind Kolås 6fca9959c7 plug-ins: migrate pagecurl to new iterator api 2018-09-11 02:05:41 +02:00
Øyvind Kolås cc10af72cc plug-ins: migrate screenshot-x11 to new iterator api 2018-09-11 02:05:13 +02:00
Øyvind Kolås 49c53568d7 plug-ins: migrate print-draw-page to new iterator api 2018-09-11 02:04:47 +02:00
Øyvind Kolås 8edbc0d491 plug-ins: migrate ifs compose to new iterator api 2018-09-11 02:04:11 +02:00
Øyvind Kolås 29f63616d2 plug-ins: migrate file-tiff-load to new iterator api 2018-09-11 02:03:09 +02:00
Øyvind Kolås 3a2014984d plug-ins: migrate psd plug-ins to new iterator api 2018-09-11 02:02:50 +02:00
Øyvind Kolås ee48ec6877 plug-ins: migrate gradient-map to new iterator api 2018-09-11 02:02:13 +02:00
Øyvind Kolås 4165a315d5 plug-ins: migrate qbist to new iterator api 2018-09-11 02:01:57 +02:00
Øyvind Kolås 764085278f plug-ins: migrate file-png to new iterator-api 2018-09-11 02:01:47 +02:00
Øyvind Kolås b7633c722e plug-ins: compose migrated to new iterator api 2018-09-11 01:52:42 +02:00
Øyvind Kolås 6ab12061b7 plug-ins: colormap-remap migrated to new iterator api 2018-09-11 01:52:32 +02:00
Øyvind Kolås 754a3c5b18 plug-ins: border-average migrated to new iterator api 2018-09-11 01:52:18 +02:00
Øyvind Kolås 22b4b647bd plug-ins: decompose migrated to new iterator api 2018-09-11 01:52:01 +02:00
Simon Mueller 829ca6583d Issue #2179: Make file_rawtherapee use the registry value that is...
... provided by RawTherapee's installer (version 5.5+).

See https://github.com/Beep6581/RawTherapee/issues/4783.
This patch required a small change to file_raw_get_executable_path
because the RawTherapee installer is supposed to work without admin
privileges and therefore can't write to HKLM.

Reviewer's note (Jehan): RawTherapee's installer does not add the
registry entry yet. We assume the upstream bug report will end up doing
so (someone has to make the first step!). :-)
2018-09-10 14:16:02 +02:00
Debarshi Ray 5dcee9ad37 file-jpeg: Fix the copyright and license notices of jpeg-icc.*
This code was originally written by Thomas G. Lane and Todd Newman,
and proposed for inclusion in the Independent JPEG Group's software.
However, that fell through when Tom left the IJG. It was not written by
Marti Maria - Little cms only had a copy of that code.

This code has recently been merged into libjpeg-turbo, so it seems
reasonable to now consider libjpeg-turbo as the canonical source of
these files. However, since the GIMP carries the original version of
the code proposed for IJG's JPEG, and doesn't contain any of the more
recent and minor tweaks made during its inclusion in libjpeg-turbo,
only the original copyright holders (ie., Thomas G. Lane and Todd
Newman) are mentioned.

The relevant license text was lifted from the Independent JPEG Group's
software, similar to the way it's done in Chromium and other users of
this code.

https://gitlab.gnome.org/GNOME/gimp/issues/2119
2018-08-29 17:38:49 +02:00
Jehan de11e3532c Issue #1970: Python-fu missing in 2.10.4.
Do not set the interpreter to `python2` but to whatever was found by the
AM_PATH_PYTHON2() m4 macro.
It looks like the Python2 binary we ship in our DMG may be call "python"
only (without the '2'). Let's just make our code more resilient to
various builds.
I am not sure yet this is the only/actual problem for this issue on
macOS, but this is at least in the right way.

(cherry picked from commit 8f21c9483a)
2018-08-19 12:48:02 +02:00
Jehan b810590b44 plug-ins: include the right python source in the distribution.
The python path with directory are generated files and should not be in
the dist. The previous commit was fixing an in-tree `make check` but
this one fixes the `make distcheck` as the dist was packaging the wrong
python files.

(cherry picked from commit 55a7872e1b)
2018-08-18 12:51:59 +02:00
Jehan 0832bbd771 plug-ins: replace s/printf/g_printf/
When cross-compiling, I got various linking errors for printf() calls:
> undefined reference to `libintl_printf'

I am unsure why, since this is not recent code, and it used to build
fine with mingw64 compilers (last I cross-built, which is many months
ago). Anyway g_printf() works fine, all necessary libs are already
linked, and it is supposed to be a synonym. So let's just go the easy
way and use g_printf() only.

(cherry picked from commit c49afa4f84)
2018-08-12 22:53:24 +02:00
Jehan 8e453330c9 configure: GLIB_COMPILE_RESOURCES is wrong when cross-compiling.
AM_PATH_GLIB_2_0 m4 macro actually computes this value using
$PKG_CONFIG. Yet $PKG_CONFIG variable is the pkg-config tool looking for
target libraries (not host), hence it would return the executable
`glib-compile-resources` built for the target.

Also using the same variable name invalidates our test: our own
AC_PATH_PROG was never run as the variable was already set. And no
environment variable could override this test anymore either. This is
why I rename the test variable to HOST_GLIB_COMPILE_RESOURCES.

(cherry picked from commit d1d9eb17e5)
2018-08-12 22:52:45 +02:00
ONO Yoshio f0e585e7ff Fix file-pdf-save exports broken vertical text. 2018-08-06 10:10:40 +00:00
Michael Natterer e09e563a70 Initial space invasion commit in GIMP
All babl formats now have a space equivalent to a color profile,
determining the format's primaries and TRCs. This commit makes GIMP
aware of this.

libgimp:

- enum GimpPrecision: rename GAMMA values to NON_LINEAR and keep GAMMA
  as deprecated aliases, add PERCEPTUAL values so we now have LINEAR,
  NON_LINEAR and PERCPTUAL for each encoding, matching the babl
  encoding variants RGB, R'G'B' and R~G~B~.

- gimp_color_transform_can_gegl_copy() now returns TRUE if both
  profiles can return a babl space, increasing the amount of fast babl
  color conversions significantly.

- TODO: no solution yet for getting libgimp drawable proxy buffers in
  the right format with space.

plug-ins:

- follow the GimpPrecision change.

- TODO: everything else unchanged and partly broken or sub-optimal,
  like setting a new image's color profile too late.

app:

- add enum GimpTRCType { LINEAR, NON_LINEAR, PERCEPTUAL } as
  replacement for all "linear" booleans.

- change gimp-babl functions to take babl spaces and GimpTRCType
  parameters and support all sorts of new perceptual ~ formats.

- a lot of places changed in the early days of goat invasion didn't
  take advantage of gimp-babl utility functions and constructed
  formats manually. They all needed revisiting and many now use much
  simpler code calling gimp-babl API.

- change gimp_babl_format_get_color_profile() to really extract a
  newly allocated color profile from the format, and add
  gimp_babl_get_builtin_color_profile() which does the same as
  gimp_babl_format_get_color_profile() did before. Visited all callers
  to decide whether they are looking for the format's actual profile,
  or for one of the builtin profiles, simplifying code that only needs
  builtin profiles.

- drawables have a new get_space_api(), get_linear() is now get_trc().

- images now have a "layer space" and an API to get it,
  gimp_image_get_layer_format() returns formats in that space.

- an image's layer space is created from the image's color profile,
  change gimpimage-color-profile to deal with that correctly

- change many babl_format() calls to babl_format_with_space() and take
  the space from passed formats or drawables

- add function gimp_layer_fix_format_space() which replaces the
  layer's buffer with one that has the image's layer format, but
  doesn't change pixel values

- use gimp_layer_fix_format_space() to make sure layers loaded from
  XCF and created by plug-ins have the right space when added to the
  image, because it's impossible to always assign the right space upon
  layer creation

- "assign color profile" and "discard color profile" now require use
  of gimp_layer_fix_format_space() too because the profile is now
  embedded in all formats via the space.  Add
  gimp_image_assign_color_profile() which does all that and call it
  instead of a simple gimp_image_set_color_profile(), also from the
  PDB set-color-profile functions, which are essentially "assign" and
  "discard" calls.

- generally, make sure a new image's color profile is set before
  adding layers to it, gimp_image_set_color_profile() is more than
  before considered know-what-you-are-doing API.

- take special precaution in all places that call
  gimp_drawable_convert_type(), we now must pass a new_profile from
  all callers that convert layers within the same image (such as
  image_convert_type, image_convert_precision), because the layer's
  new space can't be determined from the image's layer format during
  the call.

- change all "linear" properties to "trc", in all config objects like
  for levels and curves, in the histogram, in the widgets. This results
  in some GUI that now has three choices instead of two.
  TODO: we might want to reduce that back to two later.

- keep "linear" boolean properties around as compat if needed for file
  pasring, but always convert the parsed parsed boolean to
  GimpTRCType.

- TODO: the image's "enable color management" switch is currently
  broken, will fix that in another commit.
2018-07-21 16:42:57 +02:00
Jehan dbb9555d2f Issue #788: also install all python plug-ins in their own directory.
It seems I forgot to also install python plug-ins in a subdirectory
(because they are deactivated on master for the time being). I even
found a year-old patch from myself rotting in the tracker, and which was
doing exactly this.
I redid it, improved to fit changes.
2018-07-18 22:11:39 +02:00
Ell 0320126254 Issue #1825 - PSD files are loaded as merged by default ...
... depending on UI language

Use gimp_register_file_handler_priority(), added in the previous
commit, to increase the priority of the merged PSD loader, so that
the non-merged loader is always preferred over it (unless
explicitly chosen), regardless of the UI language.
2018-07-17 02:56:20 -04:00
luz.paz 732bcb463e Misc. comment typos
Found via `codespell`
2018-07-14 19:07:43 +00:00
Michael Natterer 680642e37c plug-ins, pdb: remove the unsharp-mask plug-in and add a PDB compat proc 2018-07-14 17:11:25 +02:00
Michael Natterer bab75b7365 Change a bazillion URLs to https://
Including all user-visible link and links called from code, like
the help pages.
2018-07-14 14:19:27 +02:00
Michael Natterer 44b469e493 Issue #1841 - Export As... mng swaps width and height
layer_cols and layer_rows were swapped.
2018-07-13 17:55:19 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 8eb77376c4 More bugzilla -> gitlab in various files 2018-07-11 22:24:02 +02:00
Adrian Perez de Castro 9fae08595d plug-ins: help-browser Web view does not need a scrolled window
In WebKitGTK+ 2.x the WebKitWebView widget handles scrolling itself
and does not need to be contained inside a GtkScrolledWindow.
2018-07-07 13:00:23 +00:00