The targets were just being left floating, and the pre-generated in-tree
source were always used instead
When bison/flex are found, ensure we actually dep on their output - thus
actually running the targets - and only use the in-tree copies as a
fallback
When changing the width we got a division by zero crash because we
did not consider the case of bpp * bitspp being less than 8.
To fix this we check if bitspp is less than 8 and in that case multiply
the amount of bytes by 8 and then divide by the number of bits per
pixel.
Resolves issue #9809, fix by @mareroqpoland.
When "Separate Layer" is selected, the entire drawable is always
filled rather than using the selection. This patch uses the selection
instead (which will be "all" if there is no active selection)
We use US English which uses behavior. So we replace all occurrences of
behaviour.
Most notable is File Open behavior in preferences. Besides that several
mentions in function documentation and a few in comments.
Per @ajonsson, gettext does not like < or > used as symbols
and throws a warning. They are replaced with HTML entities
< and > to prevent the problem.
- Remove the wiki which is now dead.
- Update the roadmap link and title it in plural.
- Move the "Bug Reports and Feature Requests" inside "GIMP Online/" submenu.
This removes a bunch of inconsistencies we had from the before-2.99.16 version
because new items from plug-ins were all added at the bottom of their respective
submenu.
Sphere-designer: Since some of the strings are translated versions, we
can't know in advance how long they are going to be.
Let's use string copy/cat functions that explicitly check the size and
are guaranteed to add a NULL.
- Add modern error handling using GError.
- Check return values of fseek and fgetc for errors.
- Remove most occurrences of g(u)long.
- Fixed overflow issue with maxred/green/blue found with coverity.
I noticed this in coverity. I couldn't find any actual script using
SF_DISPLAY, so the impact probably isn't very big.
Because the enums start at 0, the size of the array should be at least
one more than the value of the last enum, which was not the case here.
Increase the size of the array by 1, so that accessing SF_DISPLAY,
which is the enum with the highest value, is valid.
Resolves#5742.
The check is for a horizontal line (where the Y coordinate
would be the same for all three points), but the X axis was
checked instead due to a copy/paste error.
Note that in the future, we expect this to be possible to create other brushes
with a same name. Maybe we should have a special function allowing to request
core resources (the ones installed by GIMP itself).
Adding unsupported messages was overwriting the old message without
first freeing it. In addition, the first message was initialized
as a string constant.
We now start with duplicating the (empty) string, so that it can be
freed. We then add a define to reduce boilerplate to add the string
for each unsupported feature. The code in this define takes care of
adding the new message and freeing the old message.
Make sure we use gsize for intermediate results to not get integer
overflow on large image sizes.
This still is not ideal, but better than a crash, since we may (try to)
allocate a very large block of memory, which we should eventually fix
by looping over smaller size buffers.
This was introduced in commit 95fa902827. Unfortunately Gitlab web UI is really
not good at showing indentation issues (or any other space coding style issues,
for that matter).
Switching to the cfitsio library's fits_read_img () function in 03ea666f
caused RGB FITS images to be read in upside down per SiriL developers and
NASA standards (odd, since cfitsio is maintained by NASA). This flips them back.
The developers of SiriL sent me some RGB FITS images that rendered incorrectly
after d4f42076. These must be read in as
planes rather than individual rows.
… being installed.
There is already most of the main code logic for this, though now plug-ins need
to be in their own subdirectories, which breaks for plug-ins/common/ and
plug-ins/python/, while I needed plug-ins in both these categories to generate
the Windows installer welcome images (file-png, and python-fu-eval in
particular).
Once again, meson was not very helpful, since all its functions still refuse to
output generated files in subdirectories, so I end up duplicating plug-in files
with a custom Python script.
This should fix the CI. It was working on my machine as GIMP was installed, but
such a build rule should work even without GIMP installed.
This will also be useful in the future when we'll want to run unit tests of
plug-ins through the finale GIMP binary itself.
Fixes several missing declaration warnings because in fact of missing include,
such as:
> warning: no previous declaration for ‘console_editor_new’ [-Wmissing-declarations]
Fixes 2 old-style definitions:
> warning: old-style function definition [-Wold-style-definition]
When porting depth-merge to GimpPlugin in 5154b271 the return statements
were not fully replicated. As a result, the depth-merge function was
called even if the dialogue had been cancelled.
This patch adds the missing return statements to prevent this.
Half of the smaller dimension seem a better value, since once we reach any half,
it means we will compute using all pixels anyway. Any width higher than this is
useless.
Resolves#414.
Currently GIMP only loads the palette colors used in a GIF, discarding
the rest. This can cause issues when a consistent palette is required
(e.g. a video game sprite or background).
This patch uses either the global or local GIF max palette value to set
the colormap size, thus retaining the full palette on import.
Rename fields of ConsoleInterface more desciptive
Add c,h files for object editor and history
Extract object ConsoleEditor
Extract object ConsoleHistory
Extract TotalHistory methods
The order of GIMP_PROCEDURE_SENSITIVE_DRAWABLE |
GIMP_PROCEDURE_SENSITIVE_DRAWABLES was reversed in
gimp_procedure_set_sensitivity_mask (), which caused scripts using
SF_ONE_OR_MORE_DRAWABLE to crash.
8bpp and below ICO formats use a 1 bit mask for transparency.
When imported the mask is treated as an additional transparent color.
If the icon used the max palette (e.g. 2 colors for a 1bit icon),
the default export format will become larger than necessary.
This checks if the layer still has 1 bit alpha, and subtracts the
mask color from the count.
In commits a6756b515b and 23da44e3c8, newer API of librsvg were used, over our
current minimum requirement. The reason why we don't bump this requirement is
that librsvg 2.40.x are the latest versions which are full-C. While we have
nothing against Rust, it is not available on all existing platforms, and we
really want to have GIMP buildable everywhere, while also have SVG support
always present (even though it's a vector format, it's an important one in
graphics work nowadays).
See issue #6821.
So in the end, let's keep the old minimum requirement, but test against librsvg
version to compiler either with old API or new one. The changes are limited
enough that it's not too much a bother.
Much like for images and items. Change the PDB to transmit IDs
instead of names for brush, pattern etc. and refactor a whole
lot of libgimp code to deal with it.
modified: libgimp/gimpplugin-private.h
The name of the nl-filter plug-in in the manual was recently changed to be
more in line with its description.
Since that is already the name of the plug-in file here, let's also update
the name of PLUG_IN_PROC to be in line with this.
distress-selection.scm uses gimp-image-set-active-channel which has been
removed causing script failure when a channel is selected instead of a
layer.
Use the new multi-layer aware gimp-image-set-selected-channels and also
use the gimp-item-id-is-* functions instead of the deprecated
gimp-item-is-* functions.
This allows our script-fu plugins to use the GIMP enum values, just like
all our other plug-ins know them.
In other words:
* Names are consistent with those of other plug-ins
* Introspectable enums are automatically added as they are added to the
introspection file, without even needing a recompile
* No need to keep track of our enum types anymore, as that is just a
redundant implementation of introspection in practice. This in turn
will let us simplify some of the pdb code
and Plug-in/Procedure Browser size.
gtk_widget_set_size_request () is applied to the dialog, as it does not
seem to bubble up from being applied to individual elements.
The existing 2.10 width/height values are used.
GLib has a specific type for byte arrays: `GBytes` (and it's underlying
GType `G_TYPE_BYTES`).
By using this type, we can avoid having a `GimpUint8Array` which is a
bit cumbersome to use for both the C API, as well as bindings. By using
`GBytes`, we allow other languages to pass on byte arrays as they are
used to, while the bindings will make sure to do the right thing.
In the end, it makes the API a little bit simpler for everyone, and
reduces confusion for people who are used to working with byte arrays
in other C/GLib based code (and not having 2 different types to denote
the same thing).
Related: https://gitlab.gnome.org/GNOME/gimp/-/issues/5919
TIFFs with PSD layers can be saved in either Macintosh or IBM PC format.
IBM PC section labels are reversed and the integers are Little Endian.
We now check for 'MIB8' sections and reverse the necessary values so
that the PSD plug-in functions can handle them.
"Hold and Modify" ILBM images use control bits to increase the palette
beyond what's stored in the CMAP chunk. This patch checks if
HAM mode is set and then interprets the plane bits accordingly.
As GdkRGBA stores colors as doubles rather than guint16, the assignment
code had to be moved into the ifdef block as well.
Note that this code is only used if X11 is not available on build.
These five plug-ins already used GimpProcedureDialog when I originally
worked on them for !9250. However, their export GUI needs to
use GimpSaveProcedureDialog instead.
Let's make cfitsio an optional dependency, showing up in the final configure
output. The file-fits plug-in will just not be built when the dep is missing.
Switch to NASA-maintained cfitsio library for loading/exporting FITS images.
This allows us to import compressed FITS files (GZIP, HCOMP, PLIO, RICE) in
8/16/32 bit and float/double precision. It also simplifies export code using
the built-in cfitsio APIs.
- Missed a necessary autotools change: forgot to remove ui/Makefile
from configure.ac
- Not all compilers allow declaring variables in a case statement without
putting them in a block, so we add a block now.
Instead of loading the GtkBuilder .ui file we now create all widgets in
code.
Added several support functions to reduce code copy/pasting and making
additional widgets and supporting more metadata easier.
The overall layout should still look the same, with a few exceptions:
- Each notebook page only uses one grid. This makes it possible to align
all data entry widgets.
- Featured Organization and it's code were two treeviews next to each
other. These are now organized below each other to make automatic code
generation easier.
- Since we needed to touch this code anyway, I also fixed Xmp.dc.creator
and Xmp.iptcExt.ModelAge to be multiline. This closes#7286.
- The old icons used for the date button, add, and remove row buttons
were replaced by gimp-grid, list-add and list-remove.
Since this was the last .ui file used in GIMP plug-ins, we remove all
files from the .ui subdirectory and references to that.
Note that there are several more places where GtkBuilder is used, but
those cases uses strings defined in code instead of .ui files.
We had a lot of duplicate code using gexiv2_metadata_try_set_tag_string
and then checking for errors.
Simplify this by re-using the existing set_tag_string function by
introducing an extra parameter that tells us whether or not to clear
the tag first.
It was a temporary code added before relevant code landed in babl. The necessary merge request landed in Babl some time ago, and Gimp now requires Babl version 0.1.98, which includes the needed commit.
Related to merge_requests/509
In the master branch we depend on gexiv2 0.14, so we can remove the
deprecated functions and replace them with the "try_" versions.
We can't backport this, since our stable branch has a lower dependency
for gexiv2.