1/**
2* QImageIO Routines to read (and perhaps in the future, write) images
3* in the high definition EXR format.
4*
5* Copyright (c) 2003, Brad Hards <bradh@frogmouth.net>
6*
7* This library is distributed under the conditions of the GNU LGPL.
8*
9*/
10
11#ifndef KIMG_EXR_H
12#define KIMG_EXR_H
13
14#include <QtGui/QImageIOPlugin>
15
16class EXRHandler : public QImageIOHandler
17{
18public:
19 EXRHandler();
20
21 /**
22 Test if the file / stream can potentially read more data
23 */
24 bool canRead() const;
25
26 /**
27 Read contents from the file / stream into an image
28
29 \param outImage pointer to the QImage that the file / stream will
30 be read into
31
32 \return true on a successful read, false on failure
33 */
34 bool read( QImage *outImage );
35
36 /**
37 Write the contents of an image into the file / stream
38
39 \param image the image to write out
40
41 \return true on a successful write, false on failure
42 */
43 bool write( const QImage &image );
44
45 /**
46 The name of this plugin
47
48 \return always returns "exr" for this plugin
49 */
50 QByteArray name() const;
51
52 /**
53 Convenience routine. You should use canRead() instead.
54 */
55 static bool canRead( QIODevice *device );
56};
57
58#ifndef DOXYGEN_SHOULD_SKIP_THIS
59class EXRPlugin : public QImageIOPlugin
60{
61public:
62 QStringList keys() const;
63 Capabilities capabilities(QIODevice *device, const QByteArray &format) const;
64 QImageIOHandler *create(QIODevice *device, const QByteArray &format = QByteArray()) const;
65};
66#endif
67
68#endif
69