From af48abfa936698608deaa7cb0aef71d98c4bcb39 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 21 Apr 2011 01:17:07 -0500 Subject: [PATCH] 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; -- 1.7.2.5