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;};
153 QString
info()
const;
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...
bool hasError() const
Error status.
Trivial class to store elementary info about bitmap graphics.
QString error() const
Error message.
QString info() const
Human-readable info string about the document.
bool hasWarnings() const
Warning status.
imageInfo pageInfo(quint32 pageNumber) const
Compute imageInfo describing a given page.
QList< quint32 > pageNumbers() const
Page numbers used by this document.
QSet< QString > warnings() const
Warning messages.
QByteArray getPDFDataChunk(quint32 pageNumber) const
Return data ready for inclusion into a PDF file.
JBIG2Document(QIODevice *device)
Constructs a JBIG2 document from a QIODevice.
JBIG2Document(QString fileName)
Constructs a JBIG2 document from a file.
void clear()
Resets the document.
void read(QIODevice *device)
Reads a JBIG2 document from a QIODevice.
bool isEmpty() const
Checks if the document is empty.
QImage operator[](quint32 pageNumber) const
Render image.
JBIG2Document()
Creates an empty JBIG2 document.