88
ThunderDecode(TIFF* tif, tidata_t op, tsize_t maxpixels)
88
ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels)
90
static const char module[] = "ThunderDecode";
90
91
register unsigned char *bp;
92
93
unsigned int lastpixel;
95
96
bp = (unsigned char *)tif->tif_rawcp;
96
97
cc = tif->tif_rawcc;
142
tif->tif_rawcp = (tidata_t) bp;
143
tif->tif_rawcp = (uint8*) bp;
143
144
tif->tif_rawcc = cc;
144
145
if (npixels != maxpixels) {
145
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
146
"ThunderDecode: %s data at scanline %ld (%lu != %lu)",
147
npixels < maxpixels ? "Not enough" : "Too much",
148
(long) tif->tif_row, (long) npixels, (long) maxpixels);
146
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
147
TIFFErrorExt(tif->tif_clientdata, module,
148
"%s data at scanline %lu (%I64u != %I64u)",
149
npixels < maxpixels ? "Not enough" : "Too much",
150
(unsigned long) tif->tif_row,
151
(unsigned __int64) npixels,
152
(unsigned __int64) maxpixels);
154
TIFFErrorExt(tif->tif_clientdata, module,
155
"%s data at scanline %lu (%llu != %llu)",
156
npixels < maxpixels ? "Not enough" : "Too much",
157
(unsigned long) tif->tif_row,
158
(unsigned long long) npixels,
159
(unsigned long long) maxpixels);
155
ThunderDecodeRow(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
168
ThunderDecodeRow(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
170
static const char module[] = "ThunderDecodeRow";
160
while ((long)occ > 0) {
174
if (occ % tif->tif_scanlinesize)
176
TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be read");
161
180
if (!ThunderDecode(tif, row, tif->tif_dir.td_imagewidth))
163
182
occ -= tif->tif_scanlinesize;
164
183
row += tif->tif_scanlinesize;
171
189
TIFFInitThunderScan(TIFF* tif, int scheme)
193
tif->tif_setupdecode = ThunderSetupDecode;
174
194
tif->tif_decoderow = ThunderDecodeRow;
175
tif->tif_decodestrip = ThunderDecodeRow;
176
tif->tif_setupdecode = ThunderSetupDecode;
195
tif->tif_decodestrip = ThunderDecodeRow;
179
198
#endif /* THUNDER_SUPPORT */