package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Pixbuf_format

type t = [ `pixbuf_format ] Gobject.obj

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.

val set_disabled : t -> bool -> unit

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

val is_writable : t -> bool

Returns whether pixbufs can be saved in the given format.

val is_scalable : t -> 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.

val is_save_option_supported : t -> string -> bool

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.

val is_disabled : t -> bool

Returns whether this image format is disabled.

See gdk_pixbuf_format_set_disabled().

val get_name : t -> string

Returns the name of the format.

val get_mime_types : t -> string array

Returns the mime types supported by the format.

val get_license : t -> string

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.

val get_extensions : t -> string array

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

val get_description : t -> string

Returns a description of the format.

val get_type : unit -> Gobject.Type.t