15 #include <tqptrvector.h>
22 void kimgio_rgb_read(TQImageIO *);
23 void kimgio_rgb_write(TQImageIO *);
27 class RLEData :
public TQMemArray<uchar> {
30 RLEData(
const uchar *d, uint l, uint o) : m_offset(o) { duplicate(d, l); }
31 bool operator<(
const RLEData&)
const;
32 void write(TQDataStream& s);
33 void print(TQString)
const;
34 uint offset() {
return m_offset; }
40 class RLEMap :
public TQMap<RLEData, uint> {
42 RLEMap() : m_counter(0), m_offset(0) {}
43 uint insert(
const uchar *d, uint l);
44 TQPtrVector<RLEData> vector();
45 void setBaseOffset(uint o) { m_offset = o; }
54 SGIImage(TQImageIO *);
57 bool readImage(TQImage&);
58 bool writeImage(TQImage&);
61 enum { NORMAL, DITHERED, SCREEN, COLORMAP };
64 TQDataStream m_stream;
77 TQ_UINT32 *m_starttab;
78 TQ_UINT32 *m_lengthtab;
80 TQByteArray::Iterator m_pos;
82 TQPtrVector<RLEData> m_rlevector;
85 bool readData(TQImage&);
86 bool getRow(uchar *dest);
90 void writeVerbatim(
const TQImage&);
91 bool scanData(
const TQImage&);
92 uint compact(uchar *, uchar *);
93 uchar intensity(uchar);