20 #define JBIG2DOCUMENT 1
24 #include "imageInfo.h"
25 #include "JBIG2Segment.h"
82 void read(QIODevice *device);
92 void read(
const QString& fileName);
101 QListIterator<JBIG2Segment> i(segments);
102 while (i.hasNext()) {
103 quint32 number = i.next().pageAssociation();
115 inline bool hasError()
const {
return !_error.isEmpty();};
122 inline QString
error()
const {
return _error; };
137 inline QSet<QString>
warnings()
const {
return _warnings;};
205 static void myImageCleanupHandler(
void *
info);
209 QList<quint32> referrers(quint32 segmentNumber);
212 QSet<QString> _warnings;
218 QList<JBIG2Segment> segments;
Reads, writes and renders JBIG2 files, and chops them into pieces for inclusion into a PDF document.
void read(QIODevice *device)
Reads a JBIG2 document from a QIODevice.
bool isEmpty() const
Checks if the document is empty.
QList< quint32 > pageNumbers() const
Page numbers used by this document.
QString info() const
Human-readable info string about the document.
bool hasError() const
Error status.
QByteArray getPDFDataChunk(quint32 pageNumber) const
Return data ready for inclusion into a PDF file.
QSet< QString > warnings() const
Warning messages.
QString error() const
Error message.
JBIG2Document(QString fileName)
Constructs a JBIG2 document from a file.
JBIG2Document()
Creates an empty JBIG2 document.
bool hasWarnings() const
Warning status.
void clear()
Resets the document.
JBIG2Document(QIODevice *device)
Constructs a JBIG2 document from a QIODevice.
QImage operator[](quint32 pageNumber) const
Render image.
imageInfo pageInfo(quint32 pageNumber) const
Compute imageInfo describing a given page.
void read(const QString &fileName)
Reads a JBIG2 document from a file.
Trivial class to store elementary info about bitmap graphics.