Commit Graph

95 Commits

Author SHA1 Message Date
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 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 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 a6601d563b app: some GimpProgress cleanup
- change start() and set_text() to use "format" and "..." instead of
  "message", allowing to format progress messages in place
- s/cancelable/cancellable/
- move "cancellable" to be the second argument of start()
2014-07-12 23:45:20 +02:00
Michael Natterer d0a6d95dad app: remove a bunch of file-utils.h includes 2014-07-08 00:23:34 +02:00
Michael Natterer ff6ea69569 app: change the image's various URIs to GFiles
which gets rid of a lot of temporarily added GFile code again because
we don't need to convert between URI and GFile any longer.
2014-07-07 23:58:11 +02:00
Michael Natterer 60f23afde2 app: add a small infrastructure to validate known parasites
when they are added to items, images or globally, from the PDF or an
XCF file. None of the validation functions does anything currently,
they simply return TRUE.
2014-03-22 00:18:48 +01:00
Michael Natterer fea22c345c Bug 706361 - Printer queue dosn't show the filename of the printing image
Change the gimp-image-get-name procedure to return the same string
as shown in the image title, and mention in its API docs that this
string is meant for annotating UI elements only.
2014-03-15 17:53:10 +01:00
Hartmut Kuhse 21bed1e2fb Completely rewrite metadata handling using gexiv2
Based on original patches from Hartmut Kuhse and modified
by Michael Natterer. Changes include:

- remove libexif dependency and add a hard dependency on gexiv2
- typedef GExiv2Metadata to GimpMetadata to avoid having to
  include gexiv2 globally
- add basic GimpMetadata handling functions to libgimpbase
- add image and image file specific metadata functions to libgimp,
  including the exif orientation image rotate dialog
- port plug-ins to use the new APIs
- port file-tiff-save's UI to GtkBuilder
- add new plug-in "metadata" to view the image's metadata
- keep metadata around as GimpImage member in the core
- update the image's metadata on image size, resolution and precision
  changes
- obsolete the old metadata parasites
- migrate the old parasites to new GimpMetadata object on XCF load
2013-10-27 01:02:17 +02:00
Jehan 1351226c80 pdb: gimp-image-new's doc updated.
Add the precision that indexed images must be set a colormap after
creation, otherwise colors won't be right.
2013-10-05 01:47:05 +13:00
Michael Natterer 125cf2a2a3 app: use the image instead of the projection for accessing a pickable 2013-09-13 23:29:06 +02:00
Jehan ee8827d645 pdb: minor glitch in gimp-image-set-active-channel's description.
s/previous active channel or channel/previous active channel or layer/
2013-09-13 22:21:55 +12:00
Michael Natterer c32c1208b0 app: return a GError when flattening the image failed 2013-08-09 21:35:36 +02:00
Michael Natterer caf73f5f35 Add support for both gamma-corrected and linear for all bit depths
- Add new enum GimpComponentType which contains u8, u16, u32 etc.
- Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
- Add all the needed formats to gimp-babl.c
- Bump the XCF version to 5 and make sure version 4 with the old
  GimpPrecision enum values is loaded correctly

This change blows up the precision enums in "New Image" and
Image->Precision so we can test all this stuff. It is undecided what
format will be user-visible options in 2.10.
2013-06-23 16:51:24 +02:00
Michael Natterer cf3d234f88 Bug 672487 - Impeove API docs of gimp_image_get_channels()
Point out that the image's components are not "channels".
2013-05-10 22:11:14 +02:00
Sven Neumann c8209ddb4c Revert "pdb: update documentation for all pdb functions whose return can be freed with g_strfreev()."
Such comment should not be included in the general PDB
documentation as it is specific to the C bindings and can
be easily added by the pdbgen infrastructure.

This reverts commit c9888f2222.
2012-12-04 21:07:34 +01:00
Jehan c9888f2222 pdb: update documentation for all pdb functions whose return can be freed with g_strfreev(). 2012-12-04 00:16:08 +09:00
Jehan d8456b5d47 pdb - update documentation comments the right way.
PDB functions must be updated from *.pdb files as *_pdb.c files are
generated by make.
2012-11-28 00:57:23 +09:00
Michael Natterer 5732088b0c pdb: replace gimppdb-utils' "writable" boolean by a bitmask
called GimpPDBItemModify that currently has one member
GIMP_PDB_ITEM_CONTENT, in order to be prepared for adding
the "lock position" feature from bug 674160.
2012-11-08 20:46:18 +01:00
Michael Natterer 303e554ab1 app: remove "gboolean active_layer_only" from gimp_image_crop()
Also a very historic API, it doesn't belong there. Instead, simply
call gimp_item_resize() in GimpCropTool.
2012-09-22 15:08:05 +02:00
Michael Natterer e620eb8cef Bug 678732 - gimp-image-insert-layer inserts into a wrong place...
Fix the docs, the function does what it's supposed to do.  Passing
"0, -1" actually means "insert where the ui would insert" and is
supposed to be used when e.g. scripts create layers.
2012-08-04 02:18:15 +02:00
Michael Natterer 220b28677b Bug 676566 - Window title becomes "Untitled" after exporting without saving
Fix this and other issues more globally by moving the logic that
formats the image's display name into the GimpImage object, and return
the properly formatted name, e.g. "Foo.xcf", or "[Foo] (imported)"
from gimp_image_get_display_name().

Also add gimp_image_get_display_path() which returns the full path
instead. Use the two functions for formatting the image title, and
apply various other fixes that make sure the UI always uses the same
string to identify the image.

Call gimp_object_name_changed() whenever the save/export status
changes, so the image's cached display name and path get cleared.
2012-07-17 22:52:49 +02:00
Michael Natterer a3f12f7180 pdb: minor formatting fix in generated PDB wrappers 2012-05-28 19:55:28 +02:00
Michael Natterer 20f3cba2b6 app: rename gimp_image_base_type() to gimp_image_get_base_type() 2012-05-07 21:57:33 +02:00
Michael Natterer 7610e299ae Use GimpValueArray and GimpParamSpecValueArray
instead of the deprecated stuff from GLib.
2012-05-04 00:51:50 +02:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer 92b4c66777 pdb: export gimp-image-get-precision 2012-05-02 17:51:17 +02:00
Michael Natterer 8918fd338b pdb/libgimp: export gimp-image-new-with-precision
And switch on precision awareness of a plug-in in the core when
possible, instead of in the libgimp wrappers.
2012-05-02 17:51:17 +02:00
Michael Natterer 1bbd3d40a8 app: make the GimpTempBuf struct private and add accessors 2012-05-02 17:51:12 +02:00
Michael Natterer c07325a005 app: add "precision" argument to gimp_image_new() 2012-05-02 17:51:09 +02:00
Michael Natterer bdf6b48138 app: move GimpTempBuf from base/ to core/
and forget about include policy in base/, it's scheduled for removal
anyway.
2012-05-02 17:51:01 +02:00
Michael Natterer dccb909009 app: make GimpTempBuf reference counted
and remove the "take_ownership" parameter from
gimp_temp_buf_create_buffer(), simply always ref the buf.
2012-05-02 17:51:00 +02:00
Michael Natterer d5d8e36d21 app: gimp_-namespace all GimpTempBuf functions 2012-05-02 17:51:00 +02:00
Michael Natterer 42a5f01be3 app: rename TempBuf to GimpTempBuf 2012-05-02 17:51:00 +02:00
Michael Natterer 7441a1f6f7 app: turn the TempBuf's "bytes" into "format" and port everything to it 2012-05-02 17:50:59 +02:00
Michael Natterer 2b18645fb5 app: use gimp_drawable_get_base_type() instead of GIMP_IMAGE_TYPE_BASE_TYPE() 2012-05-02 17:50:57 +02:00
Michael Natterer f2f1eab753 app: add "ERROR" to the values of enum GimpPdbErrorCode
so they are now GIMP_PDB_ERROR_FOO instead of just GIMP_PDB_FOO,
because it was just too confusing wrt enum GimpPdbStatusType.
2012-03-05 19:36:59 +01:00
Mukund Sivaraman 42756159b5 pdb: Mark more pdb args as dead, and regen code 2011-10-08 19:25:32 +05:30
Michael Natterer e071bfa3b6 Bug 656716 - Have a procedure to get a layer from its name
Add gimp_image_get_[layer|channel|vectors]_by_name().
2011-09-24 16:35:59 +02:00
Martin Nordholts b74c7d0ff6 Bug 656471 - GIMP crashes when File > Properties 2011-08-13 23:03:31 +02:00
Eric Grivel da37e9ff3e Bug 596410 - gimp-image-get-filename returns NULL for imported files
Make gimp_image_get_uri() and gimp_image_get_filename() behave as in
the GIMP 2.6 days. Add new functions gimp_image_get_xcf_uri(),
gimp_image_get_exported_uri() and gimp_image_get_imported_uri().
2011-08-12 21:15:16 +02:00
Martin Nordholts 0f58d779c1 pdb: Untabify image.pdb 2011-08-12 20:18:45 +02:00
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Michael Natterer 87646e9ace libgimp: deprecate and rename the image parasite functions
in exactly the way the drawable functios were turned into item ones.
2011-03-08 13:19:21 +01:00
Kevin Cozens 8438bc5bb7 Commiting auto-generated files with recently corrected PDB help text. 2011-03-01 17:06:59 -05:00
Michael Natterer 02477f5563 Bug 625167 - Problem exporting floating selections from within layer groups
Add "gboolean merge_active_group" to gimp_image_merge_visible_layers()
and pass FALSE from the PDB wrapper so plug-in invoked layer merging
always acts on the toplevel container as it did in 2.6. Do the same
when opening an image as layer.

Also, added a "Merge within active group only" toggle to the merge
layers dialog and pass it down to the core, but default to TRUE here
so.
2011-02-14 09:45:59 +01:00
Michael Natterer 92b6d70448 libgimp: remove the layer/channel/vectors raise/lower/position procedures
and add them to the list of compat_procs instead.
2011-02-13 18:29:08 +01:00
Martin Nordholts 480d6e0cf2 app: Add and use gimp_image_get_uri() 2011-01-26 08:19:39 +01:00
Michael Natterer 54001221d7 pdb: deprecate gimp_layer_scale_full() and gimp_image_scale_full()
Make gimp_layer_scale() and gimp_image_scale() honor GimpPDBContext's
interpolation property and update the documentation accordingly.
2010-09-16 20:33:56 +02:00
Barak Itkin 2f62347bf6 pdb: Add a more detailed description to the gimp_image_insert functions 2010-09-15 00:02:28 +02:00