Gly.Image¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gly.Image(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Image handle containing metadata and allowing frame requests.
New in version 2.0.
- get_metadata_key_value(key)¶
- Parameters:
key (
str) – A null-terminated string.- Returns:
The UTF-8 encoded value associated with
key.- Return type:
Get metadata that are stored as key-value pairs. A prominent example are PNG’s
tEXtandzTXtchunks.::: note In contrast to gdk-pixbuf’s *option* feature, the keys do not carry prefixes like
tEXt::orzTXt::.New in version 2.0.
- get_metadata_keys()¶
- Returns:
List of existing keys.
- Return type:
[
str]
Get the list of available keys for [method`Image`.get_metadata_key_value].
New in version 2.0.
- get_mime_type()¶
- Returns:
MIME type
- Return type:
Returns detected MIME type of the file
New in version 2.0.
- get_specific_frame(frame_request)¶
- Parameters:
frame_request (
Gly.FrameRequest) –- Raises:
- Returns:
Loaded frame.
- Return type:
New in version 2.0.
- get_specific_frame_async(frame_request, cancellable, callback, *user_data)¶
- Parameters:
frame_request (
Gly.FrameRequest) –cancellable (
Gio.CancellableorNone) – A [class`Gio`.Cancellable] to cancel the operationcallback (
Gio.AsyncReadyCallbackorNone) – A callback to call when the operation is complete
Asynchronous version of [method`Image`.get_specific_frame].
New in version 2.0.
- get_specific_frame_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGAsyncResult- Raises:
- Returns:
Loaded frame.
- Return type:
Finishes the [method`Image`.get_specific_frame_async] call.
New in version 2.0.
- get_transformation_orientation()¶
- Return type:
Get the image orientation
The image orientation is given in Exif format. The function is guaranteed to only return values from 1 to 8.
If [method`Loader`.set_apply_transformations] is set to
FALSE, the orientation has to be corrected manually to dispaly the image correctly.New in version 2.0.
- get_width()¶
- Returns:
Width
- Return type:
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 2.0.
- next_frame()¶
- Raises:
- Returns:
a new [class`Frame`] on success, or
NULLwith error filled in- Return type:
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 2.0.
- next_frame_async(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – A [class`Gio`.Cancellable] to cancel the operationcallback (
Gio.AsyncReadyCallbackorNone) – A callback to call when the operation is complete
Asynchronous version of [method`Image`.next_frame].
New in version 2.0.
- next_frame_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGAsyncResult- Raises:
- Returns:
Loaded frame.
- Return type:
Finishes the [method`Image`.next_frame_async] call.
New in version 2.0.