Vincent Povirk : windowscodecs: Add support for decoding 48-bit TIFF images .
Alexandre Julliard
julliard at winehq.org
Wed Aug 25 12:35:04 CDT 2010
Module: wine
Branch: master
Commit: c30d165ec8b6dac21ae776c9c377465e73b3c372
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c30d165ec8b6dac21ae776c9c377465e73b3c372
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Sat May 29 10:43:02 2010 -0500
windowscodecs: Add support for decoding 48-bit TIFF images.
---
dlls/windowscodecs/regsvr.c | 1 +
dlls/windowscodecs/tiffformat.c | 26 +++++++++++++++++---------
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c
index d6b910d..0288633 100644
--- a/dlls/windowscodecs/regsvr.c
+++ b/dlls/windowscodecs/regsvr.c
@@ -895,6 +895,7 @@ static GUID const * const tiff_formats[] = {
&GUID_WICPixelFormat32bppBGR,
&GUID_WICPixelFormat32bppBGRA,
&GUID_WICPixelFormat32bppPBGRA,
+ &GUID_WICPixelFormat48bppRGB,
NULL
};
diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c
index d069fd1..9318ac2 100644
--- a/dlls/windowscodecs/tiffformat.c
+++ b/dlls/windowscodecs/tiffformat.c
@@ -257,9 +257,11 @@ static HRESULT tiff_get_decode_info(TIFF *tiff, tiff_decode_info *decode_info)
}
break;
case 2: /* RGB */
- if (bps != 8)
+ ret = pTIFFGetField(tiff, TIFFTAG_PLANARCONFIG, &planar);
+ if (!ret) planar = 1;
+ if (planar != 1)
{
- FIXME("unhandled RGB bit count %u\n", bps);
+ FIXME("unhandled planar configuration %u\n", planar);
return E_FAIL;
}
ret = pTIFFGetField(tiff, TIFFTAG_SAMPLESPERPIXEL, &samples);
@@ -268,16 +270,22 @@ static HRESULT tiff_get_decode_info(TIFF *tiff, tiff_decode_info *decode_info)
FIXME("unhandled RGB sample count %u\n", samples);
return E_FAIL;
}
- ret = pTIFFGetField(tiff, TIFFTAG_PLANARCONFIG, &planar);
- if (!ret) planar = 1;
- if (planar != 1)
+
+ decode_info->bpp = bps * samples;
+
+ switch(bps)
{
- FIXME("unhandled planar configuration %u\n", planar);
+ case 8:
+ decode_info->reverse_bgr = 1;
+ decode_info->format = &GUID_WICPixelFormat24bppBGR;
+ break;
+ case 16:
+ decode_info->format = &GUID_WICPixelFormat48bppRGB;
+ break;
+ default:
+ FIXME("unhandled RGB bit count %u\n", bps);
return E_FAIL;
}
- decode_info->bpp = bps * samples;
- decode_info->reverse_bgr = 1;
- decode_info->format = &GUID_WICPixelFormat24bppBGR;
break;
case 3: /* RGB Palette */
decode_info->indexed = 1;
More information about the wine-cvs
mailing list