Commit Graph

1936 Commits

Author SHA1 Message Date
Michael Natterer 436e53d390 pdb: improve docs about which procedures are affected by context settings
Also add some double blank lines so they show up as single blank
lines in the generated docs, which improves readablility.
2018-04-17 13:19:16 +02:00
Michael Natterer 93f41b344c pdb: improve docs of gimp_context_set_diagonal_neighbors() 2018-04-17 01:16:54 +02:00
Michael Natterer 90ef8b123c libgimp: properly sort gimp.defs 2018-04-16 16:13:46 +02:00
Michael Natterer 3f4995d3d7 pdb: add procedures to set the built-in gradients
gimp-context-set-gradient-fg-bg-rgb
gimp-context-set-gradient-fg-bg-hsv-cw
gimp-context-set-gradient-fg-bg-hsv-ccw
gimp-context-set-gradient-fg-transparent
2018-04-16 11:42:46 +02:00
Michael Natterer 5ee67deea5 pdb: deprecate all non-clipboard functions in the "edit" group
Still have to port script-fu scripts...
2018-04-15 16:39:59 +02:00
Michael Natterer ef3edece9b pdb: improve docs of deprecated functions
Don't unconditionally overwrite all the proc's description, author
etc.  Instead, try to preserve them and append the "Deprecated" notes
to the help texts and generated comments.

Only affects one procedure because we killed the meta info of all
other deprecated procs so far, but now we don't have to do that any
longer.
2018-04-15 16:06:00 +02:00
Michael Natterer 50536e1c38 Bug 795230 - Rename Blend tool and provide PDB compatibility
Add new PDB group "drawable_edit" which has all procedures from the
"edit" group which are not cut/copy/paste.

The new group's procedures don't have opacity, paint_mode
etc. arguments but take them from the context instead. Unlike the old
gimp-edit-fill, gimp-drawable-edit-fill now uses the context's opacity
and paint_mode.

The new gimp-drawable-edit-gradient-fill procedure uses even more
context properties which are also newly added with this commit
(gradient_color_space, gradient_repeat_mode, gradient_reverse).

And some cleanup in context.pdb.

This is still WIP, nothing in the edit group is depcreated yet.
2018-04-15 15:28:50 +02:00
Michael Natterer bf49b47620 Bug 795207 - Add color space to blend(gradient) tool options
First WIP commit, adds:

- enum GimpGradientBlendColorSpace { RGB_PERCEPTUAL, RGB_LINEAR }
- linear blending mode for gradient segments
- tool options GUI for the blend and paint tools which use gradients
2018-04-13 22:33:16 +02:00
Jehan 4bc982b84a Bug 795123 - plug-in crash starts neverending loop.
Since commit 9c8a8ae576, we don't run gimp_quit(), which properly quits
the plug-in executable, to make sure that GIMP gets the information that
it crashed. Instead quit with `exit (EXIT_FAILURE)`.
2018-04-10 14:19:34 +02:00
Michael Natterer 53fae39aee Bug 795057 - Insensitive text in plug-ins is unreadable with dark themes
Copy the fix from app/gui/themes.c to libgimp/gimpui.c so insensitive
labels look right in plug-ins too.
2018-04-08 22:55:19 +02:00
Ell 6ebc3f1b09 Makefiles: don't use -xobjective-c when linking files on Mac
Last commit caused -xobjective-c to be passed during linking on
Mac, causing object files to be treated as source files.  Add a
-xnone flag to AM_LDFLAGS, canceling the effect of -xobjective-c.

Additinally, add a -xobjective-c++ flag to AM_CXXFLAGS, so that we
can use Objective-C in C++ files on Mac, if we ever need to.
2018-04-08 04:03:55 -04:00
Ell 06950be7f0 Makefiles: don't use -xobjective-c when compiling C++ files on Mac
On Mac, pass -xobjective-c to the compiler through AM_CFLAGS, not
AM_CPPFLAGS, so that it's only used for C sources, and not C++
sources.  In the latter case, it clashes with the -std=... flag,
spewing an error.  Thanks, Partha :)
2018-04-07 16:57:52 -04:00
Jehan fa02a2c64f libgimp: add an exception handler for Windows.
Drmingw already added its own exception handler which generates crash
traces in a text file, for plug-ins as well. This additional handler is
run after Drmingw handler and allows us to do things on our own, and in
particular we could display the content of the debug traces.

Right now it simply prints these to stderr, which actually won't be of
much use on Win32, first because the console is deactivated on stable
releases, also because after tests, it doesn't look like even running
GIMP from cmd outputs to console either.

We currently don't use the same debug dialog as the core on purpose,
because we don't want everyone to send us traces for every unmaintained
third party plug-ins out there. But we should definitely allow easier
trace possibilities at some point, first to improve/debug our own core
plug-ins, and also to help third party plug-in developers!
So this commit is not making visible changes yet but is actually a first
step towards these debugging goals.
2018-04-04 20:25:29 +02:00
Jehan 76bce77d09 libgimp: various warning fixes for Win32. 2018-04-04 06:32:33 +02:00
Jehan 9c8a8ae576 libgimp: do not end the fatal and signal handlers with gimp_quit().
When ending with gimp_quit(), GIMP was not displaying the "Plug-in
crashed" error dialog, which is not good, since we lose the crash
feedback for plug-ins. Just let the plug-in continue its normal run in
order to get the error dialog.
Also protect the tracing functions, which are not working on Win32.
2018-04-04 04:47:43 +02:00
Jehan e98b937643 libgimp: add a gimp_fatal_func() allowing stack tracing plug-ins on...
... various crashes.
2018-04-04 04:33:19 +02:00
Jehan c46211190f libgimp: properly catch SIGABRT signal.
SIGABRT was in the switch list in gimp_plugin_sigfatal_handler(), but it
had not been properly handled with gimp_signal_private(), making this
switch case useless. Fix this oversight, and while doing so, move it in
the "fatal error" list for which we may generate stack traces, similarly
to core signal handling. Indeed this signal can definitely happen during
various kinds of common bugs and needs to be debugged.
2018-04-04 04:08:57 +02:00
Jehan 1789f0fe2a app, libgimp, pdb: update gimp_edit_blend() description.
Make it known that gimp_context_set_distance_metric() influences the end
render of a shapeburst blend.
2018-03-18 13:21:05 +01:00
Jehan e164aee7a9 app, libgimp, pdb: add "distance-metric" property to GimpPDBContext.
This property is currently only used for gimp_edit_blend() to control
how are computed distances. In the future, it could be used for more
functions making use of "gegl:distance-transform" operation, or even for
other algorithms, if relevant.
This new property obviously comes with 2 new PDB calls:
gimp_context_get_distance_metric() & gimp_context_set_distance_metric()
2018-03-18 01:03:40 +01:00
Michael Natterer 390ef44481 pdb, libgimp: allow to use external GType-registered enums in the PDB
The enums have to be menually registered in pdb/enums-external.pl.
Currently supports enums from GEGL only.

Add enum GeglDistanceMetric as first external enum.
2018-03-17 20:31:48 +01:00
Jehan 9b11fb2b91 app, libgimp, libgimpbase, pdb: s/GimpDistanceMetric/GeglDistanceMetric/
GeglDistanceMetric has just been added as a public enum in GEGL. Basing
our code on this, and getting rid of the newly added GimpDistanceMetric.
2018-03-17 14:57:31 +01:00
Jehan c5a0189b7f libgimp, pdb: some generated files which were not in previous commits.
It's weird. I didn't see these when I added the GimpDistanceMetric enum
type. Not sure why. Adding these now.
2018-03-15 15:05:32 +01:00
Ell a7f3a2dd9f app, pdb, libgimp, plug-ins, menus: rename layer composite modes
Our composite modes don't correspond directly to the Porter-Duff
operators after which they're named, and these names aren't too
descriptive anyway.

Rename the composite modes as follows:

  Source Over       =>  Union
  Source Atop       =>  Clip to Backdrop
  Destination Atop  =>  Clip to Layer
  Source In         =>  Intersection

Update relevant code, including UI text, enumerator names, function
names, and action names.
2018-03-14 16:19:09 -04:00
Ell 1b1fba199a app, libgimp: don't close parent pipes in libgimp; use gimp_spawn_set_cloexec()
In gimp_plug_in_open(), use gimp_spawn_set_cloexec() to prevent the
parent's end of the read/write pipes from being inherited by the
spawned plug-in, instead of passing the corresponding file
descriptors to the plug-in as command-line arguments, and having
gimp_main() close them.

Adding new command-line arguments to plug-ins is problematic, since
their ability to handle them depends on their protocol version,
which is only communicated after the plug-in is spawned.

Regardless, this is much simpler.
2018-03-06 16:31:17 -05:00
Ell b9e629abbb app, libgimp: use gimp_spawn_async() when spawning plug-ins
In gimp_plug_in_open(), use gimp_spawn_async(), added in the
previous commit, instead of g_spawn_async().  See the previous
commit for the rationale.

Since gimp_spawn_async() doesn't provide a mechanism to perform any
cleanup in the child before exec()ing, move the closing of the
parent's end of the read/write pipes from the app to the plug-in's
gimp_main(), passing the relevant file descriptors to the plug-in
through argv.
2018-03-05 01:55:40 -05:00
Michael Natterer 374fee451c libgimpbase: consistent gimp_stack_trace namespace for stack trace functions
Change the rest of the source accordingly.
2018-02-22 12:35:43 +01:00
Jehan e53d0c742c libgimp: replace gimp_on_error_query() and g_on_error_stack_trace().
Our own implementation is much better.
I don't make it into a GUI yet, but at least the CLI option will use the
new implementation in plug-ins as well, which will be quite useful.
2018-02-09 02:25:58 +01:00
Jehan 2e18c80c58 libgimp: add gimp_get_pdb_status() to return the status of last...
... procedure call.
This is needed for plug-ins which depends on other plug-in's procedures.
If for instance, the second-level plug-in is interrupted interactively,
we don't want to process this as an error but as a cancellation.
Therefore we need to know the returned value of the plug-in. Currently
only way was to use gimp_get_pdb_error() but that was returning a
human-readable error, not a computer-processable error.
2018-01-19 14:19:55 +01:00
Jehan 13dcd876e5 libgimp: always forgetting we need to update this def file! 2018-01-11 22:17:32 +01:00
Jehan 3061268e25 libgimp: gimp_image_metadata_save_prepare() uses metadata preferences.
gimp_image_metadata_save_prepare() now back to suggesting metadata
flags, but this time with reasonnable base. It indeed uses the presence
of particular metadata, but also whether the preferences asks for this
metadata to be exported by default or not.
2018-01-11 22:17:32 +01:00
Jehan 4c4fa84f85 app, libgimp, libgimpbase: new gimp_export_(exif|xmp|iptc)() functions.
These allows plug-ins to know the preferences regarding metadata.
2018-01-11 22:17:32 +01:00
Jehan 5e3d4cf131 libgimp: update gimp_image_metadata_save_prepare() description.
The returned flags should not be called "suggested" flags anymore.
Having metadata available in the work image does not mean we want them
exported absolutely, which can be a security risk, especially for the
metadata which are there from the imported image.
2018-01-11 00:44:46 +01:00
Michael Natterer dce93c7d7e Bug 762443 - Levels tool Output Level sliders works incorrectly
Add "clamp-input" (which clamps the input values to [0..1])
and "clamp-output" (which clips the final result to [0..1]),
properties, parameters and GUI to:

- GimpLevelsConfig
- GimpOperationLevels
- The levels tool dialog
- The gimp_drawable_levels() PDB API

The old deprecated gimp_levels() PDB API now sets both clamping
options to TRUE which restores the 2.8 behavior.

Also reorder some stuff in GimpLevelsConfig and elsewhere so the
levels parameters are always in the same order.
2018-01-02 18:47:20 +01:00
Ell f7d6805ebb */Makefile.am: add abbreviations to generated enum files
Update the dprod production of generated enum files to include
abbreviated value descriptions, as per the previous commits.

Add a comment for translators above the abbreviated descriptions,
specifying the full description they abbreviate.
2017-11-30 03:10:14 -05:00
Ell b6cb1d167c Bug 790631 - C plug-ins instability when processing gegl graphs ...
... with several threads

Commit d8ae581703 didn't go far
enough in protecting GimpTileBackendPlugin against race conditions.
The underlying GimpTile cache is shared across all drawables, so we
must use a common lock for all instances of GimpTileBackendPlugin,
instead of one per instance.

Do just that -- replace the per-instance mutex of
GimpTileBackendPlugin with a global one.  This makes
GimpTileBackendPlugin instances thread-safe w.r.t. themselves, and
w.r.t other GimpTileBackendPlugin instances.  However, we don't aim
to make GimpTileBackendPlugin thread-safe w.r.t. other libgimp
functions at this point, since the original API has never been
thread-safe.
2017-11-22 04:38:07 -05:00
Ell d8ae581703 libgimp: make GimpTileBackendPlugin thread safe
The entire libgimp tile code is not thread safe.  For now, do the
easy thing, and protect GimpTileBackendPlugin with a mutex.
2017-11-20 09:18:41 -05:00
Michael Natterer d14f6647ad libgimp, libgimpbase: rename gimp_base_compat_enum_init()
to gimp_base_compat_enums_init() and move its prototype from
gimputils.h to gimpbase-private.h; it's not supposed to be
public API even though it's callable from the outside.
2017-10-29 18:37:18 +01:00
Massimo Valentini 7c32451dfb Bug 784305 - Deprecated enum constants are not registered in python-fu. 2017-10-24 02:34:34 +02:00
Ell 4db000a522 pdb, libgimp: add gimp-item-{get,set}-expanded()
... which call gimp_viewable_{get,set}_expanded()
2017-10-22 12:30:21 -04:00
Michael Natterer e6c1c14a94 pdb, libgimp: change the gimp-drawable-invert API again
Remove the invert-linear and invert-non-linear variants and simply add
"gboolean linear" to gimp-drawable-invert. This should actually be an
enum but I didn't find a good name right now...
2017-09-03 21:28:47 +02:00
Michael Natterer 582c6edd54 libgimp*: use some g_clear_object() and g_clear_pointer() 2017-09-03 15:14:51 +02:00
Michael Natterer 2e6c39ed9c pdb, libgimp: rename gimp_drawable_invert() to _invert_non_linear()
and add gimp_drawable_invert_linear(). Also, finally deprecate
gimp_invert() and port all its uses in plug-ins and scripts to
gimp_drawable_invert_non_linear() so the result is the same.
2017-08-30 12:27:17 +02:00
Ell 0ef3795f0a */Makefile.am: work around a bug in the new glib-genmarshal
glib-genmarshal was rewritten in glib 2.53.4, and as of now (2.53.6)
it has a bug where it unconditionally generates marshaler bodies,
even for standard marshalers, even with --stdinc.  This causes
libgimpwidgets to define and export g_cclosure_marshal_VOID__INT()
and g_cclosure_marshal_VOID__OBJECT(), which upsets defcheck, and
breaks the build.

Work around this for now by using --header --body when generating
the marshal.c files, which includes the prototypes in the source,
instead of including the header ourselves.  This is the only code
path where the new glib-genmarshal doesn't generate bodies for
standard marshalers.  Note, however, that this usage is deprecated,
so we'll probably want to change it back once it's fixed.
2017-08-27 15:33:09 -04:00
Michael Natterer e16c8a2352 Move the new "default_new_layer_mode" APIs to the image...
...in both the core and libgimp.

Images now know what the default mode for new layers is:

- NORMAL for empty images
- NORMAL for images with any non-legacy layer
- NORMAL_LEGAVY for images with only legacy layers

This changes behavior when layers are created from the UI, but *also*
when created by plug-ins (yes there is a compat issue here):

- Most (all?) single-layer file importers now create NORMAL layers
- Screenshot, Webpage etc also create NORMAL layers

Scripts that create images from scratch (logos etc) should not be
affected because they usually have NORMAL_LEGACY hardcoded.

3rd party plug-ins and scripts will also behave old-style unless they
get ported to gimp_image_get_default_new_layer_mode().
2017-08-21 20:18:00 +02:00
Michael Natterer 838449254a plug-ins: use gimp_get_default_new_layer_mode() for most new layers
instead of hardcoding NORMAL_LEGACY.
2017-08-20 17:12:46 +02:00
Michael Natterer 59fae30b53 pdb: add new procedure gimp-get-default-new-layer-mode
Which returns GimpCoreConfig::default-new-layer-mode and will be
used to make plug-ins create layers/images in the configured way.
2017-08-20 16:12:53 +02:00
Michael Natterer 033e33fbf6 libgimp: use NORMAL mode for a transparent temporary layer in gimpexport.c 2017-08-20 15:06:26 +02:00
Michael Natterer 0cfe550639 app, pdb: change a lot of GIMP_LAYER_MODE_NORMAL_LEGACY to just NORMAL
this commit changes just those which make no difference to
functionality: property and object member defaults that get overridden
anyway, return values of g_return_val_if_fail(), some other stuff.
2017-08-19 20:33:47 +02:00
Jehan 15f7344038 libgimp, libgimpbase: allow multi-threaded plugins by locking...
...protocol calls.
Some calls are waiting for answers, for instance plugin procedures, and
tiles which expects data and acknoledgement.
This would result in error messages such as:
"expected tile ack and received: 5" (5 is GP_PROC_RUN)
Typically because a thread would run a procedure while another would
receive tiles.
2017-08-16 12:09:56 +02:00
Ell 440d8d6855 app: add pass-through layer mode
Only add the enum-value/mode-info for now.  Pass-through mode
appears above normal mode, in the default group, for layer groups
only.
2017-08-08 15:39:26 -04:00
Michael Natterer 747b3768ef libgimpbase: remove gimp_metadata_register_xmp_namespace[s]()
and do the same in gimp_metadata_class_init(). Also fix all compiler
warnings and other stuff.
2017-07-07 19:11:12 +02:00
Michael Natterer 945a695f2d libgimp: clean up metadata patch to not warn and other minor changes 2017-07-07 18:25:56 +02:00
Ben Touchette dc9856cfe1 Bug 769820 - Cannot enter Iptc information when no metadata is available...
...and fails to write it to file when it is

Completely redo metadata editor and viewer code, adds support for
Xmp.xmpMM.History and more.
2017-07-07 18:11:39 +02:00
Jehan 7999cfbeef libgimp*: tab cleaning. 2017-06-17 11:38:18 +02:00
Jehan 406c0475bc libgimp: clean out some tabs. 2017-06-07 16:33:39 +02:00
Michael Natterer f9ee38ea33 libgimp: add blurbs to all object properties for the docs
and some minor doc fixes.
2017-06-06 21:19:17 +02:00
Michael Natterer e67e22cf0c libgimp: forgot to push the generated libgimpfile two commits earlier 2017-06-03 18:15:23 +02:00
Ell 5bcde32caf enums: run gimp-mkenums from the build dir
Commit 1e6acbd4e1 modified the
generated enum recipes to run gimp-mkenums from the source
directory, instead of the build directory, so that only the
basenames of the corresponding header files would appear in
the comment at the top of the generated files.  This was a
mistake -- $(GIMP_MKENUMS) is expecting to be invoked from the
build directory.

Switch back to running gimp-mkenums from the build directory.  To
avoid including the relative path from the build directory to the
source directory in the generated file, add a @basename@ production
variable to gimp-mkenums, which exapnds to the basename of the
input file, and use it instead of @filename@ in the recipes for the
generated enum files.
2017-05-22 20:29:18 -04:00
Ell f9fa0d1b18 enums: don't write generated enum files to src-dir if unchanged
When regenerating an enum file, don't copy it back to the source
directory if it hasn't actually changed.  This allows using a read-
only source directory where the enum header is newer than the
generated file, as long as they're not really out of sync.

OTOH, *do* touch the generated source-dir file even when unchanged,
in order to avoid re-running its recipe on the next build, however,
allow this to silently fail (which is harmless).
2017-05-22 17:58:04 -04:00
Ell c77bcc7239 libgimp, pdb: update generated files
... due to commit 13e2153d33.
2017-05-07 12:17:50 -04:00
Ell 1e6acbd4e1 enums: generate enum files in source dir
We check them into git, so this makes it easier to keep them in
sync when using a separate build directory.

Case in point -- this commit also syncs a few enum files that went
out-of-sync with their headers.
2017-05-06 17:26:16 -04: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
Ell b7ee733e9f libgimp: add new functions to gimp.def
... and a small style change to debug.pdb
2017-04-06 12:00:26 -04:00
Ell 16bebedc44 pdb: add debug group; add debug-timer-{start,end} procs
Add a debug procedure group, living in 'debug.pdb', which would host
useful debug helper functions.  Functions in this group are not part
of the stable API, and may be changed at any point.

All procedures added to 'debug.pdb' should have a 'debug_' prefix,
and use the new std_pdb_debug() macro, which adds the proper "here be
dragons" warning to their description.

Add two debug procedures: gimp-debug-timer-start() and
gimp-debug-timer-end(), which measure elapsed time, a la
GIMP_TIMER_{START,END}, and can be used to profile script-fu
commands.
2017-04-06 11:48:05 -04:00
Jehan 913b54dd25 tools: fix visible "plug-in" strings in PDB sources.
So I previously (cf. commit bc344a9) fixed generated files instead of
the source. Oups!
Also it seems I missed a few strings here and there.
2017-04-04 13:11:30 +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 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 661c22c06f app: rename "Color (HSV)" mode to "Color (HSL)"
... since that's the color space it actually works in.

Keep the legacy "Color (HSV)" mode's name as is, wrong as it is,
since, well, that's what it used to be called...
2017-03-15 19:30:01 -04:00
Ell 3fa2c91502 app: remove mono-mix layer mode
This effectively reverts commit c6c0899655.

Removing due to lack of consensus.  We can always re-add it in the
future if we decide we want it.
2017-03-15 14:52:14 -04:00
Ell ed0fda032d app: add split layer mode
Subtracts the source layer from the destination, such that
recompositing the result with the source using merge mode
reproduces the original content.
2017-03-10 18:56:32 -05:00
Ell 23e6984d46 app: add merge layer mode
Merge mode lays the source layer on top of the destination, same as
normal mode, however, it assumes the source and destination are two
parts of an original whole, and are therefore mutually exclusive.

This is useful for blending cut & pasted content without artifacts,
or for replacing erased content in general.
2017-03-10 18:56:32 -05:00
Ell c6c0899655 app: add mono-mix layer mode
Calculates the dot product of the two input colors, and uses that
as the value for all the output color's components.  Basically,
a per-pixel mono mixer.

Useful for custom desaturation, component extraction, and crazier
stuff (bump mapping!)
2017-03-10 16:33:14 -05:00
Ell dfb3ddc4d9 app: make erase mode an ordinary layer/paint mode
Include erase mode in the menu for layers and general paint tools.
This makes the eraser tool somewhat unnecessary, but allows for
interesting use cases (e.g., airbrush eraser, etc.)
2017-03-10 15:27:03 -05: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 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 b769894b3d libgimp: fix the layer mode compat #defines to use the new value names 2017-02-26 17:20:08 +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
Michael Natterer 314ad956f8 app, libgimp: commit regenerated files after enum GimpLayerMode change
and reorder the GimpLayerModeInfo array correctly.
2017-02-20 18:21:12 +01:00
Elle Stone aaed8a6eb9 app: Bug 753163 - Add blend mode "RGB Luminance"
This adds a blend mode similar to CIE Luminance - but that does not alter
saturation.
2017-02-20 13:54:37 +01:00
Michael Natterer eeebd98005 libgimp: need to cast GimpMetadata when calling GExiv2Metadata API 2017-02-20 01:31:16 +01:00
Michael Natterer 1dd2c52ed3 app, pdb, libgimp: add PDB API for layer blend space and compositing space 2017-02-20 01:17:07 +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
Debarshi Ray 9fd139efad Bug 778896 - Make effective use of gexiv2 to remove the orientation
Usually, it is enough to reset the Exif.Image.Orientation and
Xmp.tiff.Orientation tags to neutralize the orientation of an image.
However, some cameras may use non-standard tags. In such cases, merely
setting the standard tags will make the metadata inconsistent. Hence,
it is better to use gexiv2_metadata_set_orientation because it will
take care of the non-standard tags.
2017-02-19 21:33:59 +01:00
Massimo Valentini adae3882d2 Bug 593576 - PDF Import filter: crashes when importing large image PDF or specifying high resolution 2017-02-19 20:48:39 +01:00
Michael Natterer 608070fde3 pdb, libgimp: mode gimp_temp_name() from fileops.pdb to gimp.pdb
It has nothing to do with loading/saving images.
2017-02-18 15:08:25 +01:00
Michael Natterer 40981f43cf libgimp*: get rid of icons in dialog buttons (use labels not stock IDs) 2017-02-12 16:18:54 +01:00
Ell 8f4700b839 app: add "hard mix" blend mode
Similar to the Photoshop mode of the same name.  Assigns
either 0 or 1 to each of the channels, depending on whether the
sum of source and destination channel values is less than, or
greater than (or equals to), one, respectively.

This is equivalent to inverting the source, and using it to perform
per-pixel, per-channel threshold against the destination, which is
useful for various effects.
2017-02-04 21:30:56 -05:00
Michael Natterer 2a96d598c3 app: add internal and PDB API and UI to control a layer's composite mode
Largely based on a patch by Ell, with the enum type renamed and
various small changes. Adds another axis of configurability to the
existing layer mode madness, and is WIP too.
2017-02-02 00:38:25 +01:00
Jehan d2ba594ab9 libgimp: minor tab cleaning. 2017-02-01 01:59:45 +01:00
Michael Natterer 9397aff96f app: add GIMP_LAYER_MODE_LUMA_DARKEN_ONLY and _LUMA_DARKEN_ONLY
which are perceptual versions of the new LUMINANCE_DARKEN_ONLY and
LUMINANCE_LIGHTEN_ONLY modes. Add the new modes to the UI.
2017-01-30 22:07:51 +01:00
Simon Budig 884edf56ca libgimpbase: make GimpMetadata its own type derived from GExiv2Metadata 2017-01-30 16:43:59 +01:00
Michael Natterer 69b7cb02dc libgimp, tools: commit regenerated enums files 2017-01-30 12:21:03 +01:00
Michael Natterer 8d744bc6c6 app, libgimp: found two more hidden GIMP_LAYER_MODE_NORMAL_NON_LINEAR 2017-01-28 22:48:36 +01:00
Michael Natterer 5389e8e417 app, libgimp: rename GIMP_LAYER_MODE_NORMAL to NORMAL_LINEAR
and NORMAL_NON_LINEAR to NORMAL, so it's consistent with all other
modes.
2017-01-28 21:38:52 +01:00
Michael Natterer 31241a984e app, libgimp: remove GIMP_LAYER_MODE_DARKEN,LIGHTEN_ONLY_LINEAR
There is no _LINEAR variant, the modes always do the same.
2017-01-25 22:08:06 +01:00
Michael Natterer ebd3ab1b26 A more hackish way to use GimpLayerMode instead of GimpLayerModeEffects
C++ won't allow us to use GimpLayerMode in the API where we used to
have GimpLayerModeEffects.

Move GimpLayerModeEffects to libgimpbase/gimpcompatenums.h so it's
not in the API any longer, and instead typedef and define stuff in
libgimp/gimptypes.h, and adapt the compat enum registering code
accordingly.
2017-01-24 23:28:34 +01:00
Øyvind Kolås d836d94114 app: implement non-legacy blend modes in GimpOperationLayerMode
For operations needing to override default behavior sub-classes should still be
used.

This commit also enables pinligh, vividlight and linearlight blend mode modes
2017-01-23 23:47:56 +01:00