GExiv2.PreviewImage

g GExiv2.PreviewImage GExiv2.PreviewImage GObject.Object GObject.Object GObject.Object->GExiv2.PreviewImage

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

free ()

get_data ()

get_extension ()

get_height ()

get_mime_type ()

get_width ()

try_write_file (path)

write_file (path)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class GExiv2.PreviewImage(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GExiv2.PreviewImageClass

free()[source]

Releases the preview image and all associated memory.

Deprecated since version 0.10.3: Use GObject.Object.unref() instead.

get_data()[source]
Returns:

The raw image data

Return type:

bytes

get_extension()[source]
Returns:

The preview image’s recommended file extension.

Return type:

str

get_height()[source]
Returns:

The preview image’s display height in pixels.

Return type:

int

get_mime_type()[source]
Returns:

The preview image’s MIME type.

Return type:

str

get_width()[source]
Returns:

The preview image’s display width in pixels.

Return type:

int

try_write_file(path)[source]
Parameters:

path (str) – The file path to write the preview image to.

Raises:

GLib.Error

Returns:

The number of bytes written to the file.

Return type:

int

New in version 0.14.0.

write_file(path)[source]
Parameters:

path (str) – The file path to write the preview image to.

Returns:

The number of bytes written to the file.

Return type:

int

Deprecated since version 0.14.0: Use GExiv2.PreviewImage.try_write_file() instead.