Gly.Image

g GObject.Object GObject.Object Gly.Image Gly.Image GObject.Object->Gly.Image

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_height ()

get_mime_type ()

get_width ()

next_frame ()

next_frame_async (cancellable, callback, *user_data)

next_frame_finish (result)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Gly.Image(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Gly.ImageClass

Image handle containing metadata and allowing frame requests.

New in version 1.0.

get_height()
Returns:

height

Return type:

int

See [method`Image`.get_width]

New in version 1.0.

get_mime_type()
Returns:

MIME type

Return type:

str

Returns detected MIME type of the file

New in version 1.0.

get_width()
Returns:

Width

Return type:

int

Early width information.

This information is often correct. However, it should only be used for an early rendering estimates. For everything else, the specific frame information should be used. See [method`Frame`.get_width].

New in version 1.0.

next_frame()
Raises:

GLib.Error

Returns:

a new [class`Frame`] on success, or NULL with error filled in

Return type:

Gly.Frame

Synchronously loads texture and information of the next frame.

For single still images, this can only be called once. For animated images, this function will loop to the first frame, when the last frame is reached.

New in version 1.0.

next_frame_async(cancellable, callback, *user_data)
Parameters:

Asynchronous version of [method`Image`.next_frame].

New in version 1.0.

next_frame_finish(result)
Parameters:

result (Gio.AsyncResult) – a GAsyncResult

Raises:

GLib.Error

Returns:

Loaded frame.

Return type:

Gly.Frame

Finishes the [method`Image`.next_frame_async] call.

New in version 1.0.