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

View File

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