• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

Public Types | Static Public Member Functions | List of all members
KImageIO Class Reference

#include <kimageio.h>

Public Types

enum  Mode { Reading , Writing }
 

Static Public Member Functions

static void registerFormats ()
 
static bool canWrite (const TQString &type)
 
static bool canRead (const TQString &type)
 
static TQStringList types (Mode mode=Writing)
 
static TQString pattern (Mode mode=Reading)
 
static TQString suffix (const TQString &type)
 
static TQString typeForMime (const TQString &mimeType)
 
static TQString type (const TQString &filename)
 
static TQStringList mimeTypes (Mode mode=Writing)
 
static bool isSupported (const TQString &_mimeType, Mode _mode=Writing)
 
static TQString mimeType (const TQString &_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 TQImage and TQPixmap load and save methods.

The image processing backends are written as image handlers compatible with the TQImageIO handler format. The backends are loaded on demand when a particular format is requested. 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>

Usage:

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

Example:

#include<tqpixmap.h>
#include<kimageio.h>
int main( int argc, char **argv )
{
....
KImageIO::registerFormats();
... // start main program
}
KImageIO::registerFormats
static void registerFormats()
Registers all KImageIO supported formats.
Definition: kimageio.cpp:378
See also
KImageIO, TQPixmap, TQImage, QImageIO
Author
Sirtaj Singh Kang

Definition at line 69 of file kimageio.h.

Member Enumeration Documentation

◆ Mode

enum KImageIO::Mode

Possible image file access modes.

Used in various KImageIO static function.

Definition at line 77 of file kimageio.h.

Member Function Documentation

◆ canRead()

bool KImageIO::canRead ( const TQString &  type)
static

Checks if a special type is supported for reading.

Parameters
typethe type id of the image type
Returns
true if the image format can be read

Definition at line 411 of file kimageio.cpp.

◆ canWrite()

bool KImageIO::canWrite ( const TQString &  type)
static

Checks if a special type is supported for writing.

Parameters
typethe type id of the image type
Returns
true if the image format can be written

Definition at line 392 of file kimageio.cpp.

◆ isSupported()

bool KImageIO::isSupported ( const TQString &  _mimeType,
Mode  _mode = Writing 
)
static

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

Parameters
_mimeTypethe MIME type to check
_modeTells whether to check for reading or writing capabilities
Returns
true if the type is supported

Definition at line 533 of file kimageio.cpp.

◆ mimeType()

TQString KImageIO::mimeType ( const TQString &  _filename)
static

Returns the MIME type of _filename.

Parameters
_filenamethe filename to check
Returns
the MIME type of the file, or TQString::null

Definition at line 556 of file kimageio.cpp.

◆ mimeTypes()

TQStringList KImageIO::mimeTypes ( Mode  mode = Writing)
static

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

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

Definition at line 511 of file kimageio.cpp.

◆ pattern()

TQString KImageIO::pattern ( Mode  mode = Reading)
static

Returns a list of patterns of all KImageIO supported formats.

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

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

Definition at line 384 of file kimageio.cpp.

◆ registerFormats()

void KImageIO::registerFormats ( )
static

Registers all KImageIO supported formats.

Definition at line 378 of file kimageio.cpp.

◆ suffix()

TQString KImageIO::suffix ( const TQString &  type)
static

Returns the suffix of an image type.

Parameters
typethe type id of the file format
Returns
the suffix of the file format or TQString::null if it does not exist

Definition at line 450 of file kimageio.cpp.

◆ type()

TQString KImageIO::type ( const TQString &  filename)
static

Returns the type of given filename.

Parameters
filenamethe filename to check
Returns
if the file name's suffix is known the type id of the file type, otherwise TQString::null

Definition at line 488 of file kimageio.cpp.

◆ typeForMime()

TQString KImageIO::typeForMime ( const TQString &  mimeType)
static

Returns the type of a MIME type.

Parameters
mimeTypethe MIME type to search
Returns
type id of the MIME type or TQString::null if the MIME type is not supported
Since
3.1

Definition at line 469 of file kimageio.cpp.

◆ types()

TQStringList KImageIO::types ( Mode  mode = Writing)
static

Returns a list of all KImageIO supported formats.

Parameters
modeTells whether to retrieve modes that can be read or written.
Returns
a list of the type ids

Definition at line 430 of file kimageio.cpp.


The documentation for this class was generated from the following files:
  • kimageio.h
  • kimageio.cpp

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.9.1
This website is maintained by Timothy Pearson.