Commit Graph

639 Commits

Author SHA1 Message Date
950f753ede Bug 736907 - Compat mode for XCF
- add gimp_image_get,get_xcf_compat_mode()
- add a compat toggle to GimpFileDialog which is shown and sensitive
  only for a save (not export), and if the image structure allows
  to save an old version at all. The button also has a tooltip
  which explains why it is sensitive and what it does
- add "gboolean xcf_compat" to file_save_dialog_save_image()
- in file_save_dialog_save_image(), call image_set_xcf_compat_mode(TRUE)
  only around the call to file_save() and set it to FALSE after saving
- in xcf_save_invoker(), honor the image's XCF compat flag and save an
  RLE-compressed XCF if possible

The above is very convoluted and doesn't pass the "xcf_compat" boolean
directly because we can't change the parameters of gimp-xcf-save, and
because the gimp-xcf-save might be called indirectly.
2014-10-20 22:54:11 +02:00
cd505dbd02 app: don't leak "display_file" in gimp_image_format_display_uri() 2014-10-07 15:22:49 +02:00
4fdfe10b29 app: move the XCF version logic to gimpimage.[ch]
Add gimp_image_get_xcf_version() and use it when saving XCFs. The
function also returns GIMP versions in integer (comparable) and string
form to be used by GUI logic that allows to save compatible files.
2014-09-27 20:38:43 +02:00
a805f8426a app: Use gint64 for dirty_time 2014-08-25 19:55:29 +05:30
980ba7f85a app: move memsize functions into their own files gimp-memsize.[ch] 2014-08-12 13:57:57 +02:00
af7646754f app: don't set the same GFile again in gimp_image_set_file()
or we might unref the GFile used e.g. in File->Save under the calling
code's feet.
2014-07-13 15:05:10 +02:00
c884c4f630 app: change file_utils_filename_to_uri() to file_utils_filename_to_file() 2014-07-08 10:25:25 +02:00
0c6bf0bc44 app: simplify gimp_image_set_file() 2014-07-08 00:47:58 +02:00
7f966cad39 app: keep the image's "Untitled" string around as GFile too 2014-07-08 00:15:41 +02:00
f5afc78532 app: don't leak all the image's GFiles 2014-07-08 00:03:08 +02:00
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
3dbae5e4d9 Bug 727854 - Export file type should not be based on filename extension
Keep the export proc acound in the image (just as we keep around
the save proc), and use it when exporting again.
2014-07-02 14:24:02 +02:00
0e2b8f236d Bug 731362 - Merging layers (outside layer folders)...
...causes layer folders to expand

In gimp_image_remove_layer(), don't use the top element of
image->layer_stack as the new active layer, because it is simply some
arbitrary layer that was previously selected. That stack is only good
for finding the last active layer when returning from the channels
dialog. Instead, let the proper logic run and use the new active item
returned by gimp_item_tree_remove_item(), which is the layer below the
removed one, if any, or the one above it otherwise.
2014-06-29 21:00:03 +02:00
57ef7a2959 app: add gimp_image_estimate_memsize()
to be used to estimate an image's memory size at another precision or
size.
2014-06-15 21:40:05 +02:00
23037b5230 app: convert all stock IDs kept around by the core by icon names
Particularly GimpViewable's stock_id. Make sure old config files
containing stock IDs are still properly parsed.
2014-05-07 01:01:56 +02:00
4f10ff3ad4 app: validate 'icc-profile' parasites before attaching them
The must be persistent and undoable and contain an RGB ICC profile.
2014-03-23 19:46:09 +01:00
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
a83851eb37 app: use gimp_parasite_name() instead of parasite->name in gimpimage.c 2014-03-17 02:29:46 +01:00
e80eaf2524 app: start an image profile API in core/gimpimage-profile.[ch]
add lowlevel functions gimp_image_get,set_icc_profile() which deal
with ICC profiles in a GimpParasite.
2014-03-16 23:50:41 +01:00
3c918353fb app: add double precision support, for completeness
and because it makes us look utterly cool.
2014-03-09 00:43:55 +01:00
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
697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
4d01e21104 app: implement the GimpPickable interface for GimpImage
by delegating to the image's projection.
2013-09-13 23:25:30 +02:00
37372555e5 Bug 704118 - crash on invalid number of PLTE entries
Make sure an indexed image always has a colormap. This was the case
before, except one could set a NULL colormap via the PDB.

Add gimp_image_unset_colormap(), and make gimp_image_set_colormap()
never set the colormap to NULL, even if NULL is passed. Change the
only places where actual unsetting makes sense to use unset().

Make some GUI places deal gracefully with palettes/colormaps with zero
entries.
2013-07-14 22:25:44 +02:00
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
c55c2b0c4d app: fix gimp_image_get_active_mask() for GRAY and INDEXED modes
Need to check image->active[ALPHA_G,I] for the alpha component.
2013-04-30 18:35:05 +02:00
b16f75b8af app: make the FS' drawable update itself when the active components change
which removes more FS knowledge from the image.
2013-04-12 15:58:42 +02:00
fc2ec83723 app: simply put GimpImage's layer and channel stacks on top of each other
which gets rid of the gegl:over we used to combine them.
2013-04-11 14:40:41 +02:00
aa56bcd284 app: add new class GimpFilterStack factored out of GimpDrawableStack
and make it the parent class of GimpItemStack. Which means we now have
a generic stack of filters independent of any image items.
2013-04-11 12:25:11 +02:00
908f727f0a Chain up unconditionally in GObject::constructed()
It's supported since GLib 2.28.
2012-11-12 21:51:22 +01:00
6ddb977542 app: reimplement image component visibility using gimp:mask-components 2012-10-06 23:58:46 +02:00
c9e788c39d app: add gimp_babl_mask_format(precision) 2012-09-27 23:50:20 +02:00
7597b83bd8 app: plug string leak in gimp_image_format_display_uri() 2012-09-21 10:34:17 +02:00
16798d839c app: keep the projection around in the image's layer format
so it's not always 8 bit and can be used to copy real data from in all
precisions.
2012-07-30 16:00:02 +02:00
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
daad966b8f app: remove GimpImage's cached preview
because GimpViewable already implements exactly the same.
2012-06-25 00:23:07 +02:00
759b71b8e9 app: remove GimpProjectable::get_layers() and ::get_channels() 2012-05-20 20:28:27 +02:00
06c59973d3 app: remove the entire legacy composition code 2012-05-19 00:41:43 +02:00
ab4c613a70 Bug 675994 - Opening image with a saved selection breaks histogram updating
In fact, it broke much more than that because the way XCF loading
replaced the image's mask prevented the image's "mask-changed" signal
from ever being emitted. Add private API gimp_image_take_mask() which
properly sets the mask and use it for image construction and the XCF
selection loading hack.
2012-05-14 01:44:41 +02:00
20f3cba2b6 app: rename gimp_image_base_type() to gimp_image_get_base_type() 2012-05-07 21:57:33 +02:00
94da46c373 app: add precision argument to gimp_image_get_format()
and use it instead of gimp_babl_format() in some places where indexed
formats can occur. Also fix some places using gimp_babl_format() to
special case indexed formats correctly.
2012-05-07 21:46:47 +02:00
3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
28c2fdc9d5 app: "fix" the format of the indexed component
to be "Y u8", so it at least extracts something reasonable.
2012-05-02 17:51:21 +02:00
4c83e208d4 app: fix precision condition for indexed images 2012-05-02 17:51:20 +02:00
1badcb7ce9 app: add GIMP_PRECISION_U32 and all its formats 2012-05-02 17:51:19 +02:00
2e7944cad0 app: add GIMP_PRECISION_HALF for 16 bit floating point
and use babl_format_get_palette() to simplify some code.
2012-05-02 17:51:18 +02:00
d81ea1315e app: implement active, affected components in GEGL
Add GimpOperationMaskComponents, enum GimpComponentMask, and image and
drawable infrastructure to get the right mask, and plug the mask
operation into gimp_gegl_create_apply_buffer_node().
2012-05-02 17:51:17 +02:00
b4580e74e6 app: implement converting images between precisions, including menu items 2012-05-02 17:51:16 +02:00
a7198ac80f app: allow indexed images only at u8 precision 2012-05-02 17:51:16 +02:00
5167550271 app: add GIMP_PRECISION_U16 and all needed 16 bit integer formats 2012-05-02 17:51:15 +02:00