tiff: add support for inverted FillOrder for uncompressed data

Fix decoding of file b.tif, trac issue #168.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
This commit is contained in:
Stefano Sabatini 2011-05-09 21:59:20 +02:00 committed by Diego Biurrun
parent bea705752d
commit b437f5b055
1 changed files with 7 additions and 1 deletions

View File

@ -170,7 +170,13 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t* dst, int stride, const uin
}
switch(s->compr){
case TIFF_RAW:
memcpy(dst, src, width);
if (!s->fill_order) {
memcpy(dst, src, width);
} else {
int i;
for (i = 0; i < width; i++)
dst[i] = av_reverse[src[i]];
}
src += width;
break;
case TIFF_PACKBITS: