Top |
High-level functions for specific informationHigh-level functions for specific information — A set of helper functions to simplify accessing specific information |
The functions in this section will use several individual tags to provide or set the required information while trying to follow the MWG recommendations
GExiv2Orientation gexiv2_metadata_try_get_orientation (GExiv2Metadata *self
,GError **error
);
The EXIF Orientation field
self |
An instance of GExiv2Metadata |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
void gexiv2_metadata_try_set_orientation (GExiv2Metadata *self
,GExiv2Orientation orientation
,GError **error
);
The orientation must be valid and cannot be GEXIV2_ORIENTATION_UNSPECIFIED.
self |
An instance of GExiv2Metadata |
|
orientation |
The new GExiv2Orientation for the image. |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
gint gexiv2_metadata_try_get_metadata_pixel_width (GExiv2Metadata *self
,GError **error
);
Composite accessor to query the pixel with stored in the metadata. This
might differ from the width of image that is available through
gexiv2_metadata_get_pixel_width()
self |
An instance of GExiv2Metadata |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
gint gexiv2_metadata_try_get_metadata_pixel_height (GExiv2Metadata *self
,GError **error
);
Composite accessor to query the pixel with stored in the metadata. This
might differ from the height of image that is available through
gexiv2_metadata_get_pixel_height()
self |
An instance of GExiv2Metadata |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
void gexiv2_metadata_try_set_metadata_pixel_width (GExiv2Metadata *self
,gint width
,GError **error
);
Composite setter to update the image's metadata with width
self |
An instance of GExiv2Metadata |
|
width |
The width of the image as it should be put into the metadata |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
void gexiv2_metadata_try_set_metadata_pixel_height (GExiv2Metadata *self
,gint height
,GError **error
);
Update the image's metadata with height
self |
An instance of GExiv2Metadata |
|
height |
The width of the image as it should be put into the metadata. |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
gchar * gexiv2_metadata_try_get_comment (GExiv2Metadata *self
,GError **error
);
A composite accessor that uses the first available metadata field from a list of well-known locations to find the photo's comment (or description).
MWG guidelines refer to these as Description: a textual description of a resource's content.
These fields are:
Exif.Image.ImageDescription (MWG Guidelines)
Exif.Photo.UserComment
Exif.Image.XPComment
Iptc.Application2.Caption (MWG Guidelines)
Xmp.dc.description (MWG Guidelines)
Xmp.acdsee.notes (Commonly requested, read only)
For fine-grained control, it's recommended to use Exiv2 tags directly rather than this method, which is more useful for quick or casual use.
self |
An instance of GExiv2Metadata |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
void gexiv2_metadata_try_set_comment (GExiv2Metadata *self
,const gchar *comment
,GError **error
);
This is a composite setter that will set a number of fields to the supplied value. See gexiv2_metadata_get_comment for more information.
self |
An instance of GExiv2Metadata |
|
comment |
Comment string to set. Must not be |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
void
gexiv2_metadata_clear_comment (GExiv2Metadata *self
);
This is a composite clear method that will clear a number of fields. See gexiv2_metadata_get_comment for more information.
gboolean gexiv2_metadata_try_get_exposure_time (GExiv2Metadata *self
,gint *nom
,gint *den
,GError **error
);
Returns the exposure time in seconds (shutter speed, not date-time of exposure) as a rational. See https://en.wikipedia.org/wiki/Shutter_speed for more information.
self |
An instance of GExiv2Metadata |
|
nom |
The numerator. |
[out] |
den |
The denominator. |
[out] |
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
gdouble gexiv2_metadata_try_get_fnumber (GExiv2Metadata *self
,GError **error
);
See https://en.wikipedia.org/wiki/F-number for more information. If Exif.Photo.FNumber does not exist, it will fall back to calculating the FNumber from Exif.Photo.ApertureValue (if available);
self |
An instance of GExiv2Metadata |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
gdouble gexiv2_metadata_try_get_focal_length (GExiv2Metadata *self
,GError **error
);
See https://en.wikipedia.org/wiki/Flange_focal_distance for more information.
self |
An instance of GExiv2Metadata |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
gint gexiv2_metadata_try_get_iso_speed (GExiv2Metadata *self
,GError **error
);
See https://en.wikipedia.org/wiki/Iso_speed for more information.
self |
An instance of GExiv2Metadata |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
gboolean gexiv2_metadata_try_get_gps_latitude (GExiv2Metadata *self
,gdouble *latitude
,GError **error
);
Query the latitude stored in the GPS tags of self
self |
An instance of GExiv2Metadata |
|
latitude |
Variable to store the latitude value. |
[out] |
error |
A return location for a GError or |
[allow-none] |
Since: 0.12.2
gboolean gexiv2_metadata_try_get_gps_longitude (GExiv2Metadata *self
,gdouble *longitude
,GError **error
);
Query the longitude stored in the GPS tags of self
self |
An instance of GExiv2Metadata |
|
longitude |
Variable to store the longitude value. |
[out] |
error |
A return location for a GError or |
[allow-none] |
Since: 0.12.2
gboolean gexiv2_metadata_try_get_gps_altitude (GExiv2Metadata *self
,gdouble *altitude
,GError **error
);
Convenience function to query the altitude stored in the GPS tags of the image
self |
An instance of GExiv2Metadata |
|
altitude |
Variable to store the altitude value. |
[out] |
error |
A return location for a GError or |
[allow-none] |
Since: 0.12.2
gboolean gexiv2_metadata_try_get_gps_info (GExiv2Metadata *self
,gdouble *longitude
,gdouble *latitude
,gdouble *altitude
,GError **error
);
Convenience function to query all available GPS information at once.
self |
An instance of GExiv2Metadata |
|
longitude |
Storage for longitude value. |
[out] |
latitude |
Storage for latitude value. |
[out] |
altitude |
Storage for altitude value. |
[out] |
error |
A return location for a GError or |
[allow-none] |
Since: 0.12.2
gboolean gexiv2_metadata_try_set_gps_info (GExiv2Metadata *self
,gdouble longitude
,gdouble latitude
,gdouble altitude
,GError **error
);
Convenience function to create a new set of simple GPS data. Warning: Will remove any other
GPS information that is currently set. See gexiv2_metadata_update_gps_info()
for
just modifying the GPS data.
self |
An instance of GExiv2Metadata |
|
longitude |
Longitude value to set or replace current value |
|
latitude |
Latitude value to set or replace current value |
|
altitude |
Altitude value to set or replace current value |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.12.2
gboolean gexiv2_metadata_try_update_gps_info (GExiv2Metadata *self
,gdouble longitude
,gdouble latitude
,gdouble altitude
,GError **error
);
Convenience function to update longitude, latitude and altitude at once.
self |
An instance of GExiv2Metadata |
|
longitude |
Longitude value to set or replace current value |
|
latitude |
Latitude value to set or replace current value |
|
altitude |
Altitude value to set or replace current value |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.12.2
void gexiv2_metadata_try_delete_gps_info (GExiv2Metadata *self
,GError **error
);
Removes all GPS metadata from the loaded image
self |
An instance of GExiv2Metadata |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.12.2
GExiv2PreviewProperties **
gexiv2_metadata_get_preview_properties
(GExiv2Metadata *self
);
An image may have stored one or more previews, often of different qualities, sometimes of different image formats than the containing image. This call returns the properties of all previews Exiv2 finds within the loaded image. Use gexiv2_metadata_get_preview_image to load a particular preview into memory.
An array of GExiv2PreviewProperties instances, one for each preview present in the loaded image.
[transfer none][allow-none][array zero-terminated=1]
GExiv2PreviewImage * gexiv2_metadata_try_get_preview_image (GExiv2Metadata *self
,GExiv2PreviewProperties *props
,GError **error
);
self |
An instance of GExiv2Metadata |
|
props |
A GExiv2PreviewProperties instance |
|
error |
A return location for a GError or |
[allow-none] |
Since: 0.14.0
GExiv2Orientation
gexiv2_metadata_get_orientation (GExiv2Metadata *self
);
gexiv2_metadata_get_orientation
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_orientation()
instead.
The EXIF Orientation field
void gexiv2_metadata_set_orientation (GExiv2Metadata *self
,GExiv2Orientation orientation
);
gexiv2_metadata_set_orientation
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_set_orientation()
instead.
The orientation must be valid and cannot be GEXIV2_ORIENTATION_UNSPECIFIED.
gint
gexiv2_metadata_get_metadata_pixel_width
(GExiv2Metadata *self
);
gexiv2_metadata_get_metadata_pixel_width
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_metadata_pixel_width()
instead.
Composite accessor to query the pixel with stored in the metadata. This
might differ from the width of image that is available through
gexiv2_metadata_get_pixel_width()
gint
gexiv2_metadata_get_metadata_pixel_height
(GExiv2Metadata *self
);
gexiv2_metadata_get_metadata_pixel_height
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_metadata_pixel_height()
instead.
Composite accessor to query the pixel with stored in the metadata. This
might differ from the height of image that is available through
gexiv2_metadata_get_pixel_height()
void gexiv2_metadata_set_metadata_pixel_width (GExiv2Metadata *self
,gint width
);
gexiv2_metadata_set_metadata_pixel_width
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_set_metadata_pixel_width()
instead.
Composite setter to update the image's metadata with width
self |
An instance of GExiv2Metadata |
|
width |
The width of the image as it should be put into the metadata |
void gexiv2_metadata_set_metadata_pixel_height (GExiv2Metadata *self
,gint height
);
gexiv2_metadata_set_metadata_pixel_height
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_set_metadata_pixel_height()
instead.
Update the image's metadata with height
self |
An instance of GExiv2Metadata |
|
height |
The width of the image as it should be put into the metadata. |
gchar *
gexiv2_metadata_get_comment (GExiv2Metadata *self
);
gexiv2_metadata_get_comment
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_comment()
instead.
A composite accessor that uses the first available metadata field from a list of well-known locations to find the photo's comment (or description).
MWG guidelines refer to these as Description: a textual description of a resource's content.
These fields are:
Exif.Image.ImageDescription (MWG Guidelines)
Exif.Photo.UserComment
Exif.Image.XPComment
Iptc.Application2.Caption (MWG Guidelines)
Xmp.dc.description (MWG Guidelines)
Xmp.acdsee.notes (Commonly requested, read only)
For fine-grained control, it's recommended to use Exiv2 tags directly rather than this method, which is more useful for quick or casual use.
void gexiv2_metadata_set_comment (GExiv2Metadata *self
,const gchar *comment
);
gexiv2_metadata_set_comment
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_set_comment()
instead.
This is a composite setter that will set a number of fields to the supplied value. See gexiv2_metadata_get_comment for more information.
gboolean gexiv2_metadata_get_exposure_time (GExiv2Metadata *self
,gint *nom
,gint *den
);
gexiv2_metadata_get_exposure_time
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_exposure_time()
instead.
Returns the exposure time in seconds (shutter speed, not date-time of exposure) as a rational. See https://en.wikipedia.org/wiki/Shutter_speed for more information.
gdouble
gexiv2_metadata_get_fnumber (GExiv2Metadata *self
);
gexiv2_metadata_get_fnumber
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_fnumber()
instead.
See https://en.wikipedia.org/wiki/F-number for more information. If Exif.Photo.FNumber does not exist, it will fall back to calculating the FNumber from Exif.Photo.ApertureValue (if available);
gdouble
gexiv2_metadata_get_focal_length (GExiv2Metadata *self
);
gexiv2_metadata_get_focal_length
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_focal_length()
instead.
See https://en.wikipedia.org/wiki/Flange_focal_distance for more information.
gint
gexiv2_metadata_get_iso_speed (GExiv2Metadata *self
);
gexiv2_metadata_get_iso_speed
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_iso_speed()
instead.
See https://en.wikipedia.org/wiki/Iso_speed for more information.
void
gexiv2_metadata_delete_gps_info (GExiv2Metadata *self
);
gexiv2_metadata_delete_gps_info
has been deprecated since version 0.12.2 and should not be used in newly-written code.
Use gexiv2_metadata_try_delete_gps_info()
instead.
Removes all GPS metadata from the loaded image
gboolean gexiv2_metadata_get_gps_info (GExiv2Metadata *self
,gdouble *longitude
,gdouble *latitude
,gdouble *altitude
);
gexiv2_metadata_get_gps_info
has been deprecated since version 0.12.2 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_gps_info()
instead.
Convenience function to query all available GPS information at once.
self |
An instance of GExiv2Metadata |
|
longitude |
Storage for longitude value. |
[out] |
latitude |
Storage for latitude value. |
[out] |
altitude |
Storage for altitude value. |
[out] |
gboolean gexiv2_metadata_get_gps_latitude (GExiv2Metadata *self
,gdouble *latitude
);
gexiv2_metadata_get_gps_latitude
has been deprecated since version 0.12.2 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_gps_latitude()
instead.
Query the latitude stored in the GPS tags of self
gboolean gexiv2_metadata_get_gps_longitude (GExiv2Metadata *self
,gdouble *longitude
);
gexiv2_metadata_get_gps_longitude
has been deprecated since version 0.12.2 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_gps_longitude()
instead.
Query the longitude stored in the GPS tags of self
self |
An instance of GExiv2Metadata |
|
longitude |
Variable to store the longitude value. |
[out] |
gboolean gexiv2_metadata_get_gps_altitude (GExiv2Metadata *self
,gdouble *altitude
);
gexiv2_metadata_get_gps_altitude
has been deprecated since version 0.12.2 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_gps_altitude()
instead.
Convenience function to query the altitude stored in the GPS tags of the image
gboolean gexiv2_metadata_set_gps_info (GExiv2Metadata *self
,gdouble longitude
,gdouble latitude
,gdouble altitude
);
gexiv2_metadata_set_gps_info
has been deprecated since version 0.12.2 and should not be used in newly-written code.
Use gexiv2_metadata_try_set_gps_info()
instead.
Convenience function to create a new set of simple GPS data. Warning: Will remove any other
GPS information that is currently set. See gexiv2_metadata_update_gps_info()
for
just modifying the GPS data.
self |
An instance of GExiv2Metadata |
|
longitude |
Longitude value to set or replace current value |
|
latitude |
Latitude value to set or replace current value |
|
altitude |
Altitude value to set or replace current value |
gboolean gexiv2_metadata_update_gps_info (GExiv2Metadata *self
,gdouble longitude
,gdouble latitude
,gdouble altitude
);
gexiv2_metadata_update_gps_info
has been deprecated since version 0.12.2 and should not be used in newly-written code.
Use gexiv2_metadata_try_update_gps_info()
instead.
Convenience function to update longitude, latitude and altitude at once.
self |
An instance of GExiv2Metadata |
|
longitude |
Longitude value to set or replace current value |
|
latitude |
Latitude value to set or replace current value |
|
altitude |
Altitude value to set or replace current value |
Since: 0.12.1
GExiv2PreviewImage * gexiv2_metadata_get_preview_image (GExiv2Metadata *self
,GExiv2PreviewProperties *props
);
gexiv2_metadata_get_preview_image
has been deprecated since version 0.14.0 and should not be used in newly-written code.
Use gexiv2_metadata_try_get_preview_image()
instead.