make sure we support the compression, it could be a tiff image

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28370 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2008-10-29 22:40:48 +00:00
parent 8824242b84
commit 3ebfe9b245
2 changed files with 8 additions and 3 deletions

View File

@ -36,6 +36,9 @@
(fFilters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)
#define COMPRESSION_PACKBITS 32773 /* Macintosh RLE */
static const uint32 kImageBufferCount = 10;
static const uint32 kDecodeBufferCount = 2048;
@ -2549,12 +2552,12 @@ DCRaw::_LoadRAW(const image_data_info& image)
_LoadRAWCanonCompressed(image);
} else {
switch (image.compression) {
case 32773:
case COMPRESSION_PACKBITS:
_LoadRAWPacked12(image);
break;
default:
printf("unknown compression: %ld\n", image.compression);
fprintf(stderr, "DCRaw: unknown compression: %ld\n", image.compression);
throw (status_t)B_NO_TRANSLATOR;
break;
}
@ -3430,7 +3433,7 @@ DCRaw::Identify()
sizeof(image_data_info) * (fNumImages - i));
}
i--;
} else if (fImages[i].is_raw)
} else if (fImages[i].is_raw && fImages[i].compression == COMPRESSION_PACKBITS)
rawCount++;
}

View File

@ -11,6 +11,8 @@
struct jhead;
struct tiff_tag;
#define COMPRESSION_PACKBITS 32773
struct image_meta_info {
char manufacturer[64];