GdkPixbuf.PixbufFormat

Fields

None

Methods

  copy ()
  free ()
  get_description ()
  get_extensions ()
  get_license ()
  get_mime_types ()
  get_name ()
  is_disabled ()
  is_save_option_supported (option_key)
  is_scalable ()
  is_writable ()
  set_disabled (disabled)

Details

class GdkPixbuf.PixbufFormat
copy()[source]
Returns:the newly allocated copy of a GdkPixbuf.PixbufFormat. Use GdkPixbuf.PixbufFormat.free() to free the resources when done
Return type:GdkPixbuf.PixbufFormat

Creates a copy of self

New in version 2.22.

free()[source]

Frees the resources allocated when copying a GdkPixbuf.PixbufFormat using GdkPixbuf.PixbufFormat.copy()

New in version 2.22.

get_description()[source]
Returns:a description of the format.
Return type:str

Returns a description of the format.

New in version 2.2.

get_extensions()[source]
Returns:a None-terminated array of filename extensions which must be freed with GLib.strfreev() when it is no longer needed.
Return type:[str]

Returns the filename extensions typically used for files in the given format.

New in version 2.2.

get_license()[source]
Returns:a string describing the license of self.
Return type:str

Returns information about the license of the image loader for the format. The returned string should be a shorthand for a wellknown license, e.g. “LGPL”, “GPL”, “QPL”, “GPL/QPL”, or “other” to indicate some other license. This string should be freed with GLib.free() when it’s no longer needed.

New in version 2.6.

get_mime_types()[source]
Returns:a None-terminated array of mime types which must be freed with GLib.strfreev() when it is no longer needed.
Return type:[str]

Returns the mime types supported by the format.

New in version 2.2.

get_name()[source]
Returns:the name of the format.
Return type:str

Returns the name of the format.

New in version 2.2.

is_disabled()[source]
Returns:whether this image format is disabled.
Return type:bool

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:bool

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:bool

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:bool

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, gdk-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.