2013-10-20 00:38:01 +08:00
|
|
|
/* LIBGIMP - The GIMP Library
|
|
|
|
* Copyright (C) 1995-2000 Peter Mattis and Spencer Kimball
|
|
|
|
*
|
2015-09-25 06:40:57 +08:00
|
|
|
* gimpimagemetadata.h
|
2013-10-20 00:38:01 +08:00
|
|
|
*
|
|
|
|
* This library is free software: you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
2018-07-12 05:27:07 +08:00
|
|
|
* <https://www.gnu.org/licenses/>.
|
2013-10-20 00:38:01 +08:00
|
|
|
*/
|
|
|
|
|
2020-09-13 19:09:59 +08:00
|
|
|
#if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION)
|
|
|
|
#error "Only <libgimp/gimp.h> can be included directly."
|
2013-10-20 00:38:01 +08:00
|
|
|
#endif
|
|
|
|
|
2020-09-13 19:09:59 +08:00
|
|
|
|
2015-09-25 06:40:57 +08:00
|
|
|
#ifndef __GIMP_IMAGE_METADATA_H__
|
|
|
|
#define __GIMP_IMAGE_METADATA_H__
|
2013-10-20 00:38:01 +08:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
/* For information look into the C source or the html documentation */
|
|
|
|
|
|
|
|
|
2019-08-27 22:32:25 +08:00
|
|
|
GimpMetadata * gimp_image_metadata_load_prepare (GimpImage *image,
|
|
|
|
const gchar *mime_type,
|
|
|
|
GFile *file,
|
|
|
|
GError **error);
|
app, libgimp, plug-ins: move Orientation metadata handling into core.
Orientation is now handled by core code, just next to profile conversion
handling.
One of the first consequence is that we don't need to have a non-GUI
version gimp_image_metadata_load_finish_batch() in libgimp, next to a
GUI version of the gimp_image_metadata_load_finish() function in
libgimpui. This makes for simpler API.
Also a plug-in which wishes to get access to the rotation dialog
provided by GIMP without loading ligimpui/GTK+ (for whatever reason)
will still have the feature.
The main advantage is that the "Don't ask me again" feature is now
handled by a settings in `Preferences > Image Import & Export` as the
"Metadata rotation policy". Until now it was saved as a global parasite,
which made it virtually non-editable once you checked it once (no easy
way to edit parasites except by scripts). So say you refused the
rotation once while checking "Don't ask again", and GIMP will forever
discard the rotation metadata without giving you a sane way to change
your mind. Of course, I could have passed the settings to plug-ins
through the PDB, but I find it a lot better to simply handle such
settings core-side.
The dialog code is basically the same as an app/dialogs/ as it was in
libgimp, with the minor improvement that it now takes the scale ratio
into account (basically the maximum thumbnail size will be bigger on
higher density displays).
Only downside of the move to the core is that this rotation dialog is
raised only when you open an image from the core, not as a PDB call. So
a plug-in which makes say a "file-jpeg-load" PDB call, even in
INTERACTIVE run mode, won't have rotation processed. Note that this was
already the same for embedded color profile conversion. This can be
wanted or not. Anyway some additional libgimp calls might be of interest
to explicitly call the core dialogs.
2020-09-24 01:59:09 +08:00
|
|
|
void gimp_image_metadata_load_finish (GimpImage *image,
|
|
|
|
const gchar *mime_type,
|
|
|
|
GimpMetadata *metadata,
|
|
|
|
GimpMetadataLoadFlags flags);
|
2019-08-27 22:32:25 +08:00
|
|
|
|
|
|
|
GimpMetadata * gimp_image_metadata_save_prepare (GimpImage *image,
|
|
|
|
const gchar *mime_type,
|
|
|
|
GimpMetadataSaveFlags *suggested_flags);
|
|
|
|
gboolean gimp_image_metadata_save_finish (GimpImage *image,
|
|
|
|
const gchar *mime_type,
|
|
|
|
GimpMetadata *metadata,
|
|
|
|
GimpMetadataSaveFlags flags,
|
|
|
|
GFile *file,
|
|
|
|
GError **error);
|
2013-10-30 07:04:36 +08:00
|
|
|
|
2019-08-11 23:12:20 +08:00
|
|
|
GimpImage * gimp_image_metadata_load_thumbnail (GFile *file,
|
2019-08-13 06:42:10 +08:00
|
|
|
GError **error);
|
|
|
|
|
2013-10-30 07:04:36 +08:00
|
|
|
|
2013-10-20 00:38:01 +08:00
|
|
|
G_END_DECLS
|
|
|
|
|
2015-09-25 06:40:57 +08:00
|
|
|
#endif /* __GIMP_IMAGE_METADATA_H__ */
|