Module: wine Branch: master Commit: a08aa5391ec2674c341cfbbae318218b605af9ee URL: http://source.winehq.org/git/wine.git/?a=commit;h=a08aa5391ec2674c341cfbbae3...
Author: Vincent Povirk vincent@codeweavers.com Date: Thu Apr 21 01:17:07 2011 -0500
windowscodecs: Handle broken TIFF files without a RowsPerStrip tag.
---
dlls/windowscodecs/tiffformat.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index 5bce3ad..88dbc79 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -462,8 +462,11 @@ static HRESULT tiff_get_decode_info(TIFF *tiff, tiff_decode_info *decode_info) } else { - FIXME("missing RowsPerStrip value\n"); - return E_FAIL; + /* Some broken TIFF files have a single strip and lack the RowsPerStrip tag */ + decode_info->tile_height = decode_info->height; + decode_info->tile_width = decode_info->width; + decode_info->tile_stride = ((decode_info->bpp * decode_info->tile_width + 7)/8); + decode_info->tile_size = decode_info->tile_height * decode_info->tile_stride; }
decode_info->resolution_unit = 0;