Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Fonctions  · 

QImageDecoder Class Reference

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

#include <qasyncimageio.h>

List of all member functions.

Public Members

Static Public Members


Detailed Description

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."

Warning: 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.

See also Graphics Classes, Image Processing Classes, and Multimedia Classes.


Member Function Documentation

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.

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.

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.

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 ()

Returns the image currently being decoded.

QStrList QImageDecoder::inputFormats () [static]

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

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.

This file is part of the Qt toolkit. Copyright © 1995-2005 Trolltech. All Rights Reserved.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 45
  4. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  5. Les développeurs détestent-ils les antivirus ? Un programmeur manifeste sa haine envers ces solutions de sécurité 6
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
Page suivante

Le blog Digia au hasard

Logo

Déploiement d'applications Qt Commercial sur les tablettes Windows 8

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 3.3
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web