# class KImageIO | Interface to the KDE Image IO plugin architecture. More...
Definition | `#include <kimageio.h>`
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum Mode { Reading, Writing }

#### Public Static Methods

- static void registerFormats ()
- static bool canWrite (const QString& type)
- static bool canRead (const QString& type)
- static QStringList types (Mode mode = Writing)
- static QString pattern (Mode mode = Reading)
- static QString suffix (const QString& type)
- static QString type (const QString& filename)
- static QStringList mimeTypes ( Mode _mode = Writing )
- static bool isSupported ( const QString& _mimeType, Mode _mode = Writing )
- static QString mimeType ( const QString& _filename )

## Detailed Description

Interface to the KDE Image IO plugin architecture.

This library allows KDE applications to read and write images in a variety of formats, transparently via the QImage and QPixmap load and save methods.

The image processing backends are written as image handlers compatible with the QImageIO handler format. The backends are loaded on demand when a particular format is requested.

### Formats

Currently supported formats include:

- JPEG <read>
- XV <read> <write>
- EPS <read> <write>
- NETPBM <incomplete>
- PNG <read> <write, only with newer libraries>
- TIFF <read>
- KRL <read>

### Usage

Simply call the KImageIO::registerFormats() static method declared in kimgageio.h.

### Example

    	#include<qpixmap.h>
     	#include<kimgio.h>

    	int main( int argc, char **argv )
    	{
    		....
    		KImageIO::registerFormats();

    		...	// start main program
    	}

See also: KImageIO, QPixmap, QImage, QImageIO

enum Mode { Reading, Writing } | ### Mode

Possible image file access modes.

Used in various KImageIO static function.

void registerFormats () | ### registerFormats

[static]

Registers all KImageIO supported formats.

bool canWrite (const QString& type) | ### canWrite

[static]

Checks if a special type is supported for writing.

bool canRead (const QString& type) | ### canRead

[static]

Checks if a special type is supported for reading.

QStringList types (Mode mode = Writing) | ### types

[static]

Retrieve a list of all KImageIO supported formats.

Parameters:

mode | Tells whether to retrieve modes that can be read or written.

QString pattern (Mode mode = Reading) | ### pattern

[static]

Retrieve a list of patterns of all KImageIO supported formats.

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

Parameters:

mode | Tells whether to retrieve modes that can be read or written.

QString suffix (const QString& type) | ### suffix

[static]

Retrieve the suffix of an image type.

QString type (const QString& filename) | ### type

[static]

Retrieve the type of given filename.

QStringList mimeTypes ( Mode _mode = Writing ) | ### mimeTypes

[static]

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

Parameters:

mode | Tells whether to retrieve modes that can be read or written.

bool isSupported ( const QString& _mimeType, Mode _mode = Writing ) | ### isSupported

[static]

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

QString mimeType ( const QString& _filename ) | ### mimeType

[static]

Return the MIME type of `_filename`.

- Version: $Id: kimageio.h,v 1.3 2000/06/06 22:53:36 gehrmab Exp $
- Author: Sirtaj Singh Kang
- Generated: root@i386.ports.openbsd.org on Wed Apr 25 13:58:36 2001, using kdoc 2.0a53.