:right-sidebar: True PixbufFormat =================================================================== .. currentmodule:: gi.repository.GdkPixbuf .. versionadded:: 2.2 .. class:: PixbufFormat(*args, **kwargs) :no-contents-entry: 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. Methods ------- .. rst-class:: interim-class .. class:: PixbufFormat :no-index: .. method:: free() -> None Frees the resources allocated when copying a ``GdkPixbufFormat`` using :func:`~gi.repository.GdkPixbuf.PixbufFormat.copy` .. versionadded:: 2.22 .. method:: get_description() -> str | None Returns a description of the format. .. versionadded:: 2.2 .. method:: get_extensions() -> list[str] | None Returns the filename extensions typically used for files in the given format. .. versionadded:: 2.2 .. method:: get_license() -> str | None 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. .. versionadded:: 2.6 .. method:: get_mime_types() -> list[str] | None Returns the mime types supported by the format. .. versionadded:: 2.2 .. method:: get_name() -> str | None Returns the name of the format. .. versionadded:: 2.2 .. method:: is_disabled() -> bool Returns whether this image format is disabled. See :func:`~gi.repository.GdkPixbuf.PixbufFormat.set_disabled`. .. versionadded:: 2.6 .. method:: is_save_option_supported(option_key: str) -> bool Returns ``TRUE`` if the save option specified by ``option_key`` is supported when saving a pixbuf using the module implementing ``format``\. See :func:`~gi.repository.GdkPixbuf.Pixbuf.save` for more information about option keys. .. versionadded:: 2.36 :param option_key: the name of an option .. method:: is_scalable() -> 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. .. versionadded:: 2.6 .. method:: is_writable() -> bool Returns whether pixbufs can be saved in the given format. .. versionadded:: 2.2 .. method:: set_disabled(disabled: bool) -> None Disables or enables an image format. If a format is disabled, GdkPixbuf 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 :func:`~gi.repository.GdkPixbuf.PixbufFormat.get_license`. .. versionadded:: 2.6 :param disabled: ``TRUE`` to disable the format ``format`` Fields ------ .. rst-class:: interim-class .. class:: PixbufFormat :no-index: .. attribute:: description A description of the image format .. attribute:: disabled A boolean determining whether the loader is disabled` .. attribute:: domain The message domain for the ``description`` .. attribute:: extensions Typical filename extensions for the image format .. attribute:: flags A combination of ``GdkPixbufFormatFlags`` .. attribute:: license A string containing license information, typically set to shorthands like "GPL", "LGPL", etc. .. attribute:: mime_types The MIME types for the image format .. attribute:: name The name of the image format .. attribute:: signature The signature of the module