Commit Graph

1421 Commits

Author SHA1 Message Date
Michael Natterer 51520278cd app, pdb: s/GRAY/grayscale/ in user-visible strings 2015-12-26 01:14:43 +01:00
Michael Natterer 5098338470 Bug 756389 - Color-managing grayscale images
Allow to set profiles on grayscale images. Change profile validation
to check for image type and profile type. Actually the patch simply
makes some pieces of code less restrictive. Change user-visible
strings in the profile dialogs accordingly. Change PDB docs
accordingly.
2015-12-14 23:25:02 +01:00
Michael Natterer 0ff7d3ba14 libgimp, PDB: add gimp_get_icon_theme_dir() 2015-12-09 23:22:05 +01:00
Michael Natterer 16a0421894 plug-ins, pdb: remove the blur-gauss-selective plug-in, add a PDB compat proc 2015-11-29 22:01:53 +01:00
Michael Natterer b3239f58df Bug 758597 - gimp-drawable-get-pixel fails, assertion error in BABL
The code that actually allocates the returned pixel got lost when
porting this to GEGL.
2015-11-25 00:00:44 +01:00
Michael Natterer 7d1a47a554 Bug 314379 - Allow stroking as outline (not with a paint tool) via the PDB
Add PDB API to configure/query all aspects of line stroking.
2015-11-11 00:47:31 +01:00
Michael Natterer dac5493132 app: implement GimpConfig::reset() in GimpPDBContext
and reset its paint and stroke options.
2015-11-09 03:20:45 +01:00
Michael Natterer 8fa7bc3622 Bug 314379 - Allow stroking as outline (not with a paint tool) via the PDB
Add new PDB procedures gimp-context-get/set-stroke-method and honor
the new setting in gimp-edit-stroke and gimp-edit-stroke-vectors.

Internally, keep a GimpStrokeOptions around in GimpPDBContext to keep
track of the newly added PDB state, and use it for the stroke
operations instead of creating a scratch GimpStrokeOptions.
2015-11-09 01:46:07 +01:00
Michael Natterer e3ea383580 app, libgimpbase: move enum GimpStrokeMethod to libgimpbase
and rename its values.
2015-11-08 22:48:48 +01:00
Jehan 2e40768ea5 pdb: update documentation for brush-related functions.
Blurbs use third person and need a final point.
Some description were wrong or inaccurate. Add also units where
needed (radius in pixels, angle in degrees).
Some returned values have to be freed.
2015-11-02 17:19:56 +01:00
Michael Natterer 0bc3a82c77 Bug 755703 - new gaussian blur: default Abyss policy to Clamp
Fix operation name in last commit.
2015-09-28 17:40:47 +02:00
Michael Natterer 1aeeada2d8 Bug 755703 - new gaussian blur: default Abyss policy to Clamp
Default to CLAMP in the PDB compat wrappers that replace the old
plug-ins.
2015-09-28 17:27:29 +02:00
Michael Natterer 22fc50c279 app: rename all values of enum GimpContextPropMask
from GIMP_CONTEXT_FOO_MASK to GIMP_CONTEXT_PROP_MASK_FOO.
Also rename the FIRST and LAST values of enum GimpContextPropType.
2015-09-08 21:18:49 +02:00
Michael Natterer a4a0ec9598 plug-ins, pdb: remove the maze plug-in and add a PDB compat proc 2015-09-04 00:34:38 +02:00
Michael Natterer b45d31072b app, libgimpcolor: refactor GimpColorManaged::get_color_profile()
to not return a reference that has to be dropped. Also allow NULL to
be returned if the managed cannot have a profile. If it can have one,
get_color_profile() still always returns a profile (either the
assigned one, or a generated built-in one).
2015-09-03 01:36:02 +02:00
Michael Natterer e83d5e7090 plug-ins, pdb: remove the lcms plug-in and add PDB compat procedures 2015-08-27 22:06:25 +02:00
Michael Natterer 8c80ee14ff Bug 748749 - picked colors don't match image colors...
...when a color profile is active

This commit doesn't fix anything, but it prepares the code to do the
right thing:

It passes the actual raw image pixels through the entire color picking
mechanism to the widgets which display colors, particularly
GimpColorFrame.

This is needed for GimpColorFrame's "Pixel" mode (as opposed to its
RGB, HSV etc. modes) which is supposed to show the raw pixel values
from the image.

Before this commit, it was recreating the raw pixel values from the
GimpRGB value it knows, which will become impossible when we correctly
pick color managed GimpRGB values soon.
2015-08-25 00:05:59 +02:00
Michael Natterer 1715e1e60b app: keep GimpImage's profile around as GimpColorProfile
not only as parasite. This way we avoid having to create the profile
in each call to gimp_image_get_color_profile(). Also keep the built-in
profiles around in gimp_image_get_builtin_color_profile(). Add/remove
refs and unrefs as needed in all users of these functions.
2015-08-16 19:38:11 +02:00
Michael Natterer e8a5f285a7 app: change GimpBuffer to keep around an actual GimpColorProfile
not an icc_data blob. This simplifies the code using GimpBuffers
together with color profiles.
2015-08-16 13:14:56 +02:00
Michael Natterer fa5d28aad3 plug-ins, pdb: remove "set" and "set-rgb" from the lcms plug-in
and add PDB compat procedures.
2015-08-05 01:03:33 +02:00
Michael Natterer 1ca3812396 app: rename gimpimage-profile.[ch] to gimpimage-color-profile.[ch] 2015-08-02 22:18:43 +02:00
Michael Natterer 96749a440e pdb, libgimp: add gimp_image_convert_color_profile_from_file() 2015-07-28 23:11:54 +02:00
Michael Natterer b0735c9448 pdb, libgimp: add gimp_image_set_color_profile_from_file()
which sets the profile from a file containing an ICC profile.
2015-07-28 23:01:18 +02:00
Michael Natterer ccd2264a4c pdb: reorder procedures in image_color_profile.pdb 2015-07-27 23:45:25 +02:00
Michael Natterer 597a438f07 app: remove gimp_image_set_filename()
- gimp-image-set-filename PDB wrapper: implement the same there in
  a few lines
- xcf-load.c: use gimp_image_set_file() instead, and get rid of the
  last use of filename in xcf/ in favor of GFile
2015-07-13 22:43:22 +02:00
Michael Natterer 0693298d63 libgimpcolor, *: change all GimpColorConfig getters to return const gchar*
instead of a gchar* which has to be freed. Cache all the strings in
the GimpColorConfig instance.
2015-07-12 14:10:18 +02:00
Michael Natterer c102dde92b libgimpcolor, *: change GimpColorProfile to be a GObject
it used to be a typedef to gpointer and actually was a cmsHPROFILE.

Change its API to be more "standard", remove the public close()
function. The object caches both the cmsHPROFILE and the data/length
ICC blob, so conversions between the two become obsolete (simply call
get_lcms_profile() or get_icc_profile()).

Adapt everything to the new API, but port it in a naive way for now,
the code doesn't take advantage of the new possibilities yet (like
refcounting).
2015-07-10 22:53:59 +02:00
Michael Natterer d6c578c567 app: change gimp_image_crop() to use x, y, width, height 2015-07-03 19:38:08 +02:00
Michael Natterer e90e90265b app: port everything from gimp_channel_bounds() to gimp_item_bounds()
except gimpchannel.c itself.
2015-07-03 19:38:08 +02:00
Michael Natterer 4552319336 pdb: fix plug-in-autocrop compat wrapper to work like in 2.8
even if it's weird, compat is compat...
2015-07-03 17:59:08 +02:00
Thomas Manni 82223783a3 plug-ins, pdb: remove the bump-map plug-in and add 2 PDB compat procs 2015-06-30 12:02:48 +02:00
Thomas Manni 3436ae4674 plug-ins, pdb: remove the displace plug-in and add 2 PDB compat procs 2015-06-30 10:02:28 +02:00
Michael Natterer 3c706d00c6 Bug 735906 - Transform tools give unexpected results when transforming...
...certain sets of linked layers

Fix for translating layers from the PDB, and with the cursor keys
for gimpeditselectiontool. Moving layers with the mouse is still broken.

The approach is exactly the same as in 25a696c7.
2015-06-26 12:00:45 +02:00
Michael Natterer 09cd5f6720 app: add ICC data/length parameters to gimp_layer_new_from_gegl_buffer()
and pass them where we know the buffer could be from another image.
Pass "NULL, 0" if we know it's the same image.

Add gimp_layer_new_convert_profile() which takes the newly created
layer and the ICC data/length; call it from both
gimp_layer_new_from_gegl_buffer() and gimp_layer_new_from_pixbuf().

gimp_layer_new_convert_profile() is empty, this is just
infrastructure.
2015-06-20 00:39:44 +02:00
Michael Natterer 6446c007cf app: rename gimp_layer_new_from_buffer() to gimp_layer_new_from_gegl_buffer()
and add new function gimp_layer_new_from_buffer() which takes a
GimpBuffer. This will make sense soon :)
2015-06-20 00:02:11 +02:00
Michael Natterer db09d0f3d3 app: move functions to create layers to new files gimplayer-new.[ch] 2015-06-17 13:21:01 +02:00
Michael Natterer bf10da29fa app: remove GError** argument from gimp_image_get_color_profile()
we validate everything when setting it, so this function always
returns either a valid profile, or NULL.
2015-06-17 00:45:43 +02:00
Thomas Manni 769bc933d4 plug-ins, pdb: remove the wind plug-in and add a PDB compat proc 2015-06-11 11:31:36 +02:00
Michael Natterer c632ffad18 pdb, app, libgimp: add gimp_image_convert_color_profile() PDB wrapper
This commit is more complex than a usual PDB procedure because it
needs to make the enums from libgimpconfig/gimpcolorconfig-enums.h
known to the PDB.
2015-06-10 01:38:20 +02:00
Michael Natterer d1102d2be9 pdb, plug-ins: remove two procedures from lcms.c and add PDB compat procs
The lcms plug-in is on its way out: add compat procedures implementing
plug-in-icc-profile-info and plug-in-icc-profile-file-info and remove
that code from lcms.c.
2015-06-07 12:52:37 +02:00
Michael Natterer 16749cd395 pdb, app, libgimp: add gimp_image_get_effective_color_profile()
which returns the profile that is actually used for the image. And
some cleanup and fixes in image_color_profile.pdb.
2015-06-07 01:38:50 +02:00
Michael Natterer 80093a85df pdb, app, libgimp: add new PDB group image_color_profile
Which will have proper API to deal with an image's color profile (no
parasites, no ICC blobs). So far contains gimp_image_get_color_profile()
and gimp_image_set_color_profile().
2015-06-05 12:51:46 +02:00
Adrian Likins e708f41970 Bug 750377 - typo in plug-in-compat-cmds for edge invoker "algorihm"
Scripts calling plug-in-edge would cause the error:

g_object_new_valist: object class 'GeglOpedge_c' has
no property named 'algorihm'
2015-06-04 00:08:06 -04:00
Michael Natterer 4ef3c918a0 pdb, app, libgimp: move the image transform procedures to their own PDB group
because image.pdb is way too large.
2015-05-30 23:55:58 +02:00
Michael Natterer b9773efa5e pdb, app, libgimp: rename the "guides" PDB group to "imageguides"
This only renames files, no code changes.
2015-05-30 15:27:16 +02:00
Michael Natterer 3b70fb8d3a pdb, app, libgimp: rename the "grid" PDB group to "imagegrid"
This only renames files, no code changes.
2015-05-30 15:19:11 +02:00
Michael Natterer b34ed029ac pdb, app, libgimp: rename the "convert" PDB group to "imageconvert"
This only renames files, no code changes.
2015-05-30 15:09:57 +02:00
Michael Natterer f269651cc6 pdb, app, libgimp: rename the "undo" PDB group to "imageundo"
This only renames files, no code changes.
2015-05-30 15:01:50 +02:00
Michael Natterer e6703aa6b8 plug-ins, pdb: remove the papertile plug-in and add a PDB compat proc 2015-04-30 17:18:01 -04:00
Michael Natterer bc4cf9918f Bug 673501 - Issue with Overlay
GIMP's OVERLAY mode was identical to SOFTLIGHT. This commit fixes the
issue and introduces a NEW_OVERLAY mode and enum value.

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

These changes should (redundantly) make sure that no OVERLAY enum
value is used in the core any longer because it gets mapped to
SOFTLIGHT at all entry points, with the downside of introducing a
setter/getter asymmetry when OVERLAY was set in a PDB api.
2015-04-29 13:32:58 -04:00