GExiv2.PreviewImage¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GExiv2.PreviewImage(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An accessor to the preview images contained in the image’s metadata.
This could be anything from a thumbnail to a full-sized camera development of a RAW image.
The
GExiv2PreviewImageis obtained by callingGExiv2.Metadata.get_preview_image() with an instance ofGExiv2.PreviewPropertiesthat are describing the image to be fetched.```c
GExiv2.PreviewProperties**properties, **it; properties = it =GExiv2.Metadata.get_preview_properties(metadata);while (*it) { preview_image =
GExiv2.Metadata.get_preview_image(metadata, *it); it++; } ```- get_data()[source]¶
- Returns:
The raw image data
- Return type:
Get a pointer to the image data of the preview image. The returned data is owned by the preview image and must not be freed.
- get_extension()[source]¶
- Returns:
The preview image’s recommended file extension.
- Return type:
Get the file extension commonly associated with the preview image
- get_height()[source]¶
- Returns:
The preview image’s display height in pixels.
- Return type:
Get the height in pixels
- get_mime_type()[source]¶
- Returns:
The preview image’s MIME type.
- Return type:
Get the MIME type associated with the preview image.
- get_width()[source]¶
- Returns:
The preview image’s display width in pixels.
- Return type:
Get the width in pixels
- try_write_file(path)[source]¶
- Parameters:
path (
str) – The file path to write the preview image to.- Raises:
- Returns:
The number of bytes written to the file.
- Return type:
Write the preview image to a file in path
New in version 0.14.0.
Deprecated since version 0.16.0: Use [method`GExiv2`.PreviewImage.write_file] instead.