2.1 <GdkPixbufFormat>

Structure: <GdkPixbufFormat>

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.

Fields

name

the name of the image format

signature

the signature of the module

domain

the message domain for the description

description

a description of the image format

mime-types

the MIME types for the image format

extensions

typical filename extensions for the image format

flags

a combination of <%GdkPixbufFormatFlags>

disabled

a boolean determining whether the loader is disabled‘

license

a string containing license information, typically set to shorthands like "GPL", "LGPL", etc.

Procedures

Method: pixbuf-format:copy self ⇒ %return
Method: copy self ⇒ %return

Creates a copy of format.

self

Passed: a <GdkPixbufFormat>.

a pixbuf format

%return

Returned: a <GdkPixbufFormat>, or #f.

the newly allocated copy of a <GdkPixbufFormat>. Use pixbuf-format:free to free the resources when done

Method: pixbuf-format:free self
Method: free self

Frees the resources allocated when copying a <GdkPixbufFormat> using pixbuf-format:copy

self

Passed: a <GdkPixbufFormat>.

a pixbuf format

Method: pixbuf-format:get-description self ⇒ %return
Method: get-description self ⇒ %return

Returns a description of the format.

self

Passed: a <GdkPixbufFormat>.

a <GdkPixbufFormat>

%return

Returned: a string, or #f.

a description of the format.

Method: pixbuf-format:get-extensions self ⇒ %return
Method: get-extensions self ⇒ %return

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

self

Passed: a <GdkPixbufFormat>.

a <GdkPixbufFormat>

%return

Returned: a vector, each a string, or #f.

an array of filename extensions

Method: pixbuf-format:get-license self ⇒ %return
Method: get-license self ⇒ %return

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.

self

Passed: a <GdkPixbufFormat>.

a pixbuf format

%return

Returned: a string, or #f.

a string describing the license of the pixbuf format

Method: pixbuf-format:get-mime-types self ⇒ %return
Method: get-mime-types self ⇒ %return

Returns the mime types supported by the format.

self

Passed: a <GdkPixbufFormat>.

a <GdkPixbufFormat>

%return

Returned: a vector, each a string, or #f.

an array of mime types

Method: pixbuf-format:get-name self ⇒ %return
Method: get-name self ⇒ %return

Returns the name of the format.

self

Passed: a <GdkPixbufFormat>.

a <GdkPixbufFormat>

%return

Returned: a string, or #f.

the name of the format.

Method: pixbuf-format:is-disabled? self ⇒ %return
Method: is-disabled? self ⇒ %return

Returns whether this image format is disabled.

See pixbuf-format:set-disabled.

self

Passed: a <GdkPixbufFormat>.

a <GdkPixbufFormat>

%return

Returned: a boolean.

whether this image format is disabled.

Method: pixbuf-format:is-save-option-supported? self option-key ⇒ %return
Method: is-save-option-supported? self option-key ⇒ %return

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.

self

Passed: a <GdkPixbufFormat>.

a pixbuf format

option-key

Passed: a string.

the name of an option

%return

Returned: a boolean.

TRUE if the specified option is supported

Method: pixbuf-format:is-scalable? self ⇒ %return
Method: is-scalable? self ⇒ %return

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.

self

Passed: a <GdkPixbufFormat>.

a <GdkPixbufFormat>

%return

Returned: a boolean.

whether this image format is scalable.

Method: pixbuf-format:is-writable? self ⇒ %return
Method: is-writable? self ⇒ %return

Returns whether pixbufs can be saved in the given format.

self

Passed: a <GdkPixbufFormat>.

a <GdkPixbufFormat>

%return

Returned: a boolean.

whether pixbufs can be saved in the given format.

Method: pixbuf-format:set-disabled self disabled
Method: set-disabled self disabled

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 pixbuf-format:get-license.

self

Passed: a <GdkPixbufFormat>.

a <GdkPixbufFormat>

disabled

Passed: a boolean.

TRUE to disable the format self