Class (GI Struct)

GdkPixbuf-2.0GdkPixbufPixbufFormatSince 2.2

A GdkPixbuf.PixbufFormat 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.

2.2

Index

Constructors

  • Parameters

    • Optionalproperties: Partial<
          {
              description: string;
              disabled: boolean;
              domain: string;
              extensions: string[];
              flags: number;
              license: string;
              mime_types: string[];
              name: string;
          },
      >

    Returns PixbufFormat

Properties

description: string
disabled: boolean
domain: string
extensions: string[]
flags: number
license: string
mime_types: string[]
name: string

Methods

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

    Returns string[]

    an array of filename extensions

  • 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.

    Returns string

    a string describing the license of the pixbuf format

  • Returns whether this image format is disabled.

    See gdk_pixbuf_format_set_disabled().

    Returns boolean

    whether this image format is disabled.

  • Returns TRUE if the save option specified by option_key is supported when saving a pixbuf using the module implementing format.

    See gdk_pixbuf_save() for more information about option keys.

    Parameters

    • option_key: string

      the name of an option

    Returns boolean

    TRUE if the specified option is supported

  • 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.

    Returns boolean

    whether this image format is scalable.

  • Returns whether pixbufs can be saved in the given format.

    Returns boolean

    whether pixbufs can be saved in the given format.

  • 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 gdk_pixbuf_format_get_license().

    Parameters

    • disabled: boolean

      TRUE to disable the format format

    Returns void