Image#
Added in version 2.0.
Superclasses: Object
Image handle containing metadata and allowing frame requests.
Methods#
- class Image
-
- get_metadata_key_value(key: str) str | None#
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::.
Added in version 2.0.
- Parameters:
key – A null-terminated string.
- get_metadata_keys() list[str]#
Get the list of available keys for
get_metadata_key_value.Added in version 2.0.
- get_specific_frame(frame_request: FrameRequest) Frame#
Added in version 2.0.
- Parameters:
frame_request
- async get_specific_frame_async(self, frame_request: FrameRequest) Frame#
This is the awaitable version of
get_specific_frame_async().Added in version 2.0.
- Parameters:
frame_request
- get_specific_frame_async(frame_request: FrameRequest, cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
Asynchronous version of
get_specific_frame.Added in version 2.0.
- Parameters:
frame_request
cancellable – A
Cancellableto cancel the operationcallback – A callback to call when the operation is complete
user_data – Data to pass to
callback
- get_specific_frame_finish(result: AsyncResult) Frame#
Finishes the
get_specific_frame_asynccall.Added in version 2.0.
- Parameters:
result – a
GAsyncResult
- get_transformation_orientation() int#
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
set_apply_transformationsis set toFALSE, the orientation has to be corrected manually to display the image correctly.Added in version 2.0.
- get_width() 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
get_width.Added in version 2.0.
- next_frame() 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.
Added in version 2.0.
- async next_frame_async(self) Frame#
This is the awaitable version of
next_frame_async().Added in version 2.0.
- next_frame_async(cancellable: Cancellable | None = None, callback: Callable[[Object | None, AsyncResult, Any], None] | None = None, user_data: Any = None) None#
Asynchronous version of
next_frame.Added in version 2.0.
- Parameters:
cancellable – A
Cancellableto cancel the operationcallback – A callback to call when the operation is complete
user_data – Data to pass to
callback
- next_frame_finish(result: AsyncResult) Frame#
Finishes the
next_frame_asynccall.Added in version 2.0.
- Parameters:
result – a
GAsyncResult