GdkPixbuf.PixbufFormat¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
description |
r/w |
a description of the image format |
|
disabled |
r/w |
a boolean determining whether the loader is disabled` |
|
domain |
r/w |
the message domain for the |
|
extensions |
[ |
r/w |
typical filename extensions for the image format |
flags |
r/w |
a combination of |
|
license |
r/w |
a string containing license information, typically set to shorthands like “GPL”, “LGPL”, etc. |
|
mime_types |
[ |
r/w |
the MIME types for the image format |
name |
r/w |
the name of the image format |
|
signature |
r/w |
the signature of the module |
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class GdkPixbuf.PixbufFormat¶
A
GdkPixbufFormat
contains information about the image format accepted by a module.Only modules should access the fields directly, applications should use the
gdk_pixbuf_format_*
family of functions.New in version 2.2.
- copy()[source]¶
- Returns:
the newly allocated copy of a
GdkPixbufFormat
. UseGdkPixbuf.PixbufFormat.free
() to free the resources when done- Return type:
Creates a copy of
format
.New in version 2.22.
- free()[source]¶
Frees the resources allocated when copying a
GdkPixbufFormat
usingGdkPixbuf.PixbufFormat.copy
()New in version 2.22.
- get_extensions()[source]¶
-
Returns the filename extensions typically used for files in the given format.
New in version 2.2.
- get_license()[source]¶
-
Returns information about the license of the image loader for the format.
The returned string should be a shorthand for a well known license, e.g. “LGPL”, “GPL”, “QPL”, “GPL/QPL”, or “other” to indicate some other license.
New in version 2.6.
- is_disabled()[source]¶
- Returns:
whether this image format is disabled.
- Return type:
Returns whether this image format is disabled.
See
GdkPixbuf.PixbufFormat.set_disabled
().New in version 2.6.
- is_save_option_supported(option_key)[source]¶
- Parameters:
option_key (
str
) – the name of an option- Returns:
TRUE
if the specified option is supported- Return type:
Returns
TRUE
if the save option specified by option_key is supported when saving a pixbuf using the module implementing self.See gdk_pixbuf_save() for more information about option keys.
New in version 2.36.
- is_scalable()[source]¶
- Returns:
whether this image format is scalable.
- Return type:
Returns whether this image format is scalable.
If a file is in a scalable format, it is preferable to load it at the desired size, rather than loading it at the default size and scaling the resulting pixbuf to the desired size.
New in version 2.6.
- is_writable()[source]¶
- Returns:
whether pixbufs can be saved in the given format.
- Return type:
Returns whether pixbufs can be saved in the given format.
New in version 2.2.
- set_disabled(disabled)[source]¶
- Parameters:
disabled (
bool
) –TRUE
to disable the format self
Disables or enables an image format.
If a format is disabled,
GdkPixbuf.Pixbuf
won’t use the image loader for this format to load images.Applications can use this to avoid using image loaders with an inappropriate license, see
GdkPixbuf.PixbufFormat.get_license
().New in version 2.6.