start with flags = ALL (which now includes all possible current and
future flags), and optionally *remove* individual flags instead of
adding them. This way the plug-ins default to TRUE for future flags.
So the plug-in has the chance to decide whether it wants to trust the
metadata information (e.g. resolution). Also reorder parameters in
gimp_image_metadata_save_finish(). Change all plug-ins accordingly.
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
We don't care what the original image type is, because non-RGB images
(in particular indexed ones) render very badly.
gimp_layer_new_from_drawable() will automatically convert the original
layer's type to the destination image's type (RGB) while copying.
The new by-row iteration doesn't re-write the length
value for each row. In general it is not safe to modify
the iterator data because the internal logic depends
on the public data, but this specific case is new.
Currently PNG "comment" is saved in iTXt (UTF-8) if supported, tEXt
(ISO-8859-1) otherwise. The problem is that some software out there like
ImageMagick would apparently only read tEXt comments.
Therefore the replacing algorithm is:
1/ if we would not lose any character in a conversion from UTF-8 to
ISO-8859-1, we save in tEXt, whether or not the platform supports iTXt.
2/ if we would lose comment data in the conversion while iTXt is
supported, we save in iTXt.
3/ if iTXt is not supported, we save in tEXt anyway and discard any
non-convertible character, unless the finale result is an empty string
(in which case, we don't save any comment).