Gimp.Metadata¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gimp.Metadata(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Basic functions for handling
Gimp.Metadata
objects.- classmethod deserialize(metadata_xml)¶
- Parameters:
metadata_xml (
str
) – A string of serialized metadata XML.- Returns:
The new
Gimp.Metadata
.- Return type:
Deserializes a string of XML that has been created by
Gimp.Metadata.serialize
().New in version 2.10.
- classmethod get_guid()¶
- Returns:
The new GUID/UUID string.
- Return type:
Generate Version 4 UUID/GUID.
New in version 2.10.
- classmethod is_tag_supported(tag, mime_type)¶
- Parameters:
- Returns:
- Return type:
Returns whether tag is supported in a file of type mime_type.
New in version 2.10.
- classmethod load_from_file(file)¶
- Parameters:
- Raises:
- Returns:
The loaded
Gimp.Metadata
.- Return type:
Loads
Gimp.Metadata
from file.New in version 2.10.
- classmethod new()¶
- Returns:
The new
Gimp.Metadata
.- Return type:
Creates a new
Gimp.Metadata
instance.New in version 2.10.
- duplicate()¶
- Returns:
The new
Gimp.Metadata
, orNone
if self isNone
.- Return type:
Duplicates a
Gimp.Metadata
instance.New in version 2.10.
- get_colorspace()¶
- Returns:
The colorspace specified by above tags.
- Return type:
Returns values based on Exif.Photo.ColorSpace, Xmp.exif.ColorSpace, Exif.Iop.InteroperabilityIndex, Exif.Nikon3.ColorSpace, Exif.Canon.ColorSpace of self.
New in version 2.10.
- get_resolution()¶
- Returns:
True
on success,False
otherwise.- xres:
Return location for the X Resolution, in ppi
- yres:
Return location for the Y Resolution, in ppi
- unit:
Return location for the unit unit
- Return type:
Returns values based on Exif.Image.XResolution, Exif.Image.YResolution and Exif.Image.ResolutionUnit of self.
New in version 2.10.
- save_to_file(file)¶
- Parameters:
file (
Gio.File
) – The file to save the metadata to- Raises:
- Returns:
- Return type:
Saves self to file.
New in version 2.10.
- serialize()¶
- Returns:
The serialized XML string.
- Return type:
Serializes self into an XML string that can later be deserialized using
Gimp.Metadata.deserialize
().New in version 2.10.
- set_bits_per_sample(bits_per_sample)¶
- Parameters:
bits_per_sample (
int
) – Bits per pixel, per component
Sets Exif.Image.BitsPerSample on self.
New in version 2.10.
- set_colorspace(colorspace)¶
- Parameters:
colorspace (
Gimp.MetadataColorspace
) – The color space.
Sets Exif.Photo.ColorSpace, Xmp.exif.ColorSpace, Exif.Iop.InteroperabilityIndex, Exif.Nikon3.ColorSpace, Exif.Canon.ColorSpace of self.
New in version 2.10.
- set_creation_date(datetime)¶
- Parameters:
datetime (
GLib.DateTime
) – AGLib.DateTime
value
Sets
Iptc.Application2.DateCreated
,Iptc.Application2.TimeCreated
,Exif.Image.DateTime
,Exif.Image.DateTimeOriginal
,Exif.Photo.DateTimeOriginal
,Exif.Photo.DateTimeDigitized
,Exif.Photo.OffsetTime
,Exif.Photo.OffsetTimeOriginal
,Exif.Photo.OffsetTimeDigitized
,Xmp.xmp.CreateDate
,Xmp.xmp.ModifyDate
,Xmp.xmp.MetadataDate
,Xmp.photoshop.DateCreated
of self.New in version 3.0.
- set_from_exif(exif_data)¶
- Parameters:
exif_data (
bytes
) – The blob of Exif data to set- Raises:
- Returns:
- Return type:
Sets the tags from a piece of Exif data on self.
New in version 2.10.
- set_from_iptc(iptc_data)¶
- Parameters:
iptc_data (
bytes
) – The blob of Iptc data to set- Raises:
- Returns:
- Return type:
Sets the tags from a piece of IPTC data on self.
New in version 2.10.
- set_from_xmp(xmp_data)¶
- Parameters:
xmp_data (
bytes
) – The blob of XMP data to set- Raises:
- Returns:
- Return type:
Sets the tags from a piece of XMP data on self.
New in version 2.10.
- set_pixel_size(width, height)¶
-
Sets Exif.Image.ImageWidth and Exif.Image.ImageLength on self. If already present, also sets Exif.Photo.PixelXDimension and Exif.Photo.PixelYDimension.
New in version 2.10.