Eneboo - Documentación para desarrolladores
Métodos públicos | Métodos públicos estáticos
Referencia de la Clase QImageDecoder

The QImageDecoder class is an incremental image decoder for all supported image formats. Más...

#include <qasyncimageio.h>

Lista de todos los miembros.

Métodos públicos

 QImageDecoder (QImageConsumer *c)
 ~QImageDecoder ()
const QImageimage ()
int decode (const uchar *buffer, int length)
 QImageDecoder (QImageConsumer *c)
 ~QImageDecoder ()
const QImageimage ()
int decode (const uchar *buffer, int length)

Métodos públicos estáticos

static const char * formatName (const uchar *buffer, int length)
static QImageFormatTypeformat (const char *name)
static QStrList inputFormats ()
static void registerDecoderFactory (QImageFormatType *)
static void unregisterDecoderFactory (QImageFormatType *)
static const char * formatName (const uchar *buffer, int length)
static QImageFormatTypeformat (const char *name)
static QStrList inputFormats ()
static void registerDecoderFactory (QImageFormatType *)
static void unregisterDecoderFactory (QImageFormatType *)

Descripción detallada

The QImageDecoder class is an incremental image decoder for all supported image formats.

New formats are installed by creating objects of class QImageFormatType; the QMovie class can be used for all installed incremental image formats. QImageDecoder is only useful for creating new ways of feeding data to an QImageConsumer.

A QImageDecoder is a machine that decodes images. It takes encoded image data via its decode() method and expresses its decoding by supplying information to a QImageConsumer. It implements its decoding by using a QImageFormat created by one of the currently-existing QImageFormatType factory objects.

QImageFormatType and QImageFormat are the classes that you might need to implement support for additional image formats.

Qt supports GIF reading if it is configured that way during installation (see qgif.h). If it is, we are required to state that "The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated."

Atención:
If you are in a country that recognizes software patents and in which Unisys holds a patent on LZW compression and/or decompression and you want to use GIF, Unisys may require you to license that technology. Such countries include Canada, Japan, the USA, France, Germany, Italy and the UK.

GIF support may be removed completely in a future version of Qt. We recommend using the MNG or PNG format.


Documentación del constructor y destructor

QImageDecoder::QImageDecoder ( QImageConsumer c)

Constructs a QImageDecoder that will send change information to the QImageConsumer c.

QImageDecoder::~QImageDecoder ( )

Destroys a QImageDecoder. The image it built is destroyed. The decoder built by the factory for the file format is destroyed. The consumer for which it decoded the image is not destroyed.

QImageDecoder::QImageDecoder ( QImageConsumer c)
QImageDecoder::~QImageDecoder ( )

Documentación de las funciones miembro

int QImageDecoder::decode ( const uchar buffer,
int  length 
)

Call this function to decode some data into image changes. The data in buffer will be decoded, sending change information to the QImageConsumer of this QImageDecoder until one of the change functions of the consumer returns FALSE. The length of the data is given in length.

Returns the number of bytes consumed: 0 if consumption is complete, and -1 if decoding fails due to invalid data.

int QImageDecoder::decode ( const uchar buffer,
int  length 
)
QImageFormatType * QImageDecoder::format ( const char *  name) [static]

Returns a QImageFormatType by name. This might be used when the user needs to force data to be interpreted as being in a certain format. name is one of the formats listed by QImageDecoder::inputFormats(). Note that you will still need to supply decodable data to result->decoderFor() before you can begin decoding the data.

static QImageFormatType* QImageDecoder::format ( const char *  name) [static]
static const char* QImageDecoder::formatName ( const uchar buffer,
int  length 
) [static]
const char * QImageDecoder::formatName ( const uchar buffer,
int  length 
) [static]

Call this function to find the name of the format of the given header. The returned string is statically allocated. The function will look at the first length characters in the buffer.

Returns 0 if the format is not recognized.

const QImage& QImageDecoder::image ( ) [inline]
const QImage & QImageDecoder::image ( ) [inline]

Returns the image currently being decoded.

QStrList QImageDecoder::inputFormats ( ) [static]

Returns a sorted list of formats for which asynchronous loading is supported.

static QStrList QImageDecoder::inputFormats ( ) [static]
static void QImageDecoder::registerDecoderFactory ( QImageFormatType ) [static]
void QImageDecoder::registerDecoderFactory ( QImageFormatType f) [static]

Registers the new QImageFormatType f. This is not needed in application code because factories call this themselves.

void QImageDecoder::unregisterDecoderFactory ( QImageFormatType f) [static]

Unregisters the QImageFormatType f. This is not needed in application code because factories call this themselves.

static void QImageDecoder::unregisterDecoderFactory ( QImageFormatType ) [static]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'