# Namespace KImageIO

Module | kio
Namespace | KImageIO

Methods to get information about image format names and the corresponding mime type. Also, you can get information about supported image types without loading all the imageformat plugins.

The image processing backends are written as image handlers compatible with the QImageIOHandler format. The backends are Qt imageformat plugins. Each format can be identified by a unique type id string.

Formats:

Currently supported formats include:

- BMP \<read\> \<write\>
- EPS \<read\> \<write\>
- EXR \<read\>
- G3 \<read\>
- GIF \<read\>
- ICO \<read\>
- JP2 \<read\> \<write\>
- JPEG \<read\> \<write\>
- NETPBM \<read\> \<write\>
- PCX \<read\> \<write\>
- PNG \<read\> \<write, only with newer libraries\>
- TGA \<read\> \<write\>
- TIFF \<read\>
- XBM \<read\> \<write\>
- XPM \<read\> \<write\>
- XV \<read\> \<write\>

### enums

- Mode { Reading, Writing }

enum details

### methods

- isSupported (mimeType, mode)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  mimeType | QString |
  mode | KImageIO.Mode | KImageIO.Writing

  Test to see whether a MIME type is supported to reading/writing.

  _mimeType - the MIME type to check

  _mode - Tells whether to check for reading or writing capabilities Returns true if the type is supported

- mimeTypes (mode)

  returns QStringList

  Argument | Type | Default
  --- | --- | ---
  mode | KImageIO.Mode | KImageIO.Writing

  Returns a list of MIME types for all KImageIO supported formats.

  mode - Tells whether to retrieve modes that can be read or written. Returns a list if MIME types of the supported formats

- pattern (mode)

  returns QString

  Argument | Type | Default
  --- | --- | ---
  mode | KImageIO.Mode | KImageIO.Reading

  Returns a list of patterns of all KImageIO supported formats.

  These patterns can be passed to KFileDialog.getOpenFileName() or KFileDialog.getSaveFileName(), for example.

  mode - Tells whether to retrieve modes that can be read or written. Returns a space-separated list of file globs that describe the supported formats

- typeForMime (mimeType)

  returns QStringList

  Argument | Type | Default
  --- | --- | ---
  mimeType | QString |

  Returns the type of a MIME type.

  mimeType - the MIME type to search Returns type id(s) of the MIME type or QStringList() if the MIME type is not supported

- types (mode)

  returns QStringList

  Argument | Type | Default
  --- | --- | ---
  mode | KImageIO.Mode | KImageIO.Writing

  Returns a list of all KImageIO supported formats.

  mode - Tells whether to retrieve modes that can be read or written. Returns a list of the type ids

### enums - detail

- Mode { Reading, Writing }

  Possible image file access modes.

  Used in various KImageIO static function.

  | Reading | - | - |
  | Writing | - | - |