Navigation

Operators and Keywords

Function List:

C++ API

: imformats ()
: formats = imformats (ext)
: formats = imformats (format)
: formats = imformats ("add", format)
: formats = imformats ("remove", ext)
: formats = imformats ("update", ext, format)
: formats = imformats ("factory")

Manage supported image formats.

formats is a structure with information about each supported file format, or from a specific format ext, the value displayed on the field ext. It contains the following fields:

ext

The name of the file format. This may match the file extension but Octave will automatically detect the file format.

description

A long description of the file format.

isa

A function handle to confirm if a file is of the specified format.

write

A function handle to write if a file is of the specified format.

read

A function handle to open files the specified format.

info

A function handle to obtain image information of the specified format.

alpha

Logical value if format supports alpha channel (transparency or matte).

multipage

Logical value if format supports multipage (multiple images per file).

It is possible to change the way Octave manages file formats with the options "add", "remove", and "update", and supplying a structure format with the required fields. The option "factory" resets the configuration to the default.

This can be used by Octave packages to extend the image reading capabilities Octave, through use of the PKG_ADD and PKG_DEL commands.

See also: imfinfo, imread, imwrite.

Package: octave