Commit 03703439 authored by Tobias Koenig's avatar Tobias Koenig
Browse files

Scale TIFF without RESUNIT entry correctly by using default values

svn path=/trunk/KDE/kdegraphics/okular/; revision=982340
parent 14ed111d
...@@ -110,7 +110,7 @@ static void adaptSizeToResolution( TIFF *tiff, ttag_t whichres, double dpi, uint ...@@ -110,7 +110,7 @@ static void adaptSizeToResolution( TIFF *tiff, ttag_t whichres, double dpi, uint
float resvalue = 1.0; float resvalue = 1.0;
uint16 resunit = 0; uint16 resunit = 0;
if ( !TIFFGetField( tiff, whichres, &resvalue ) if ( !TIFFGetField( tiff, whichres, &resvalue )
|| !TIFFGetField( tiff, TIFFTAG_RESOLUTIONUNIT, &resunit ) ) || !TIFFGetFieldDefaulted( tiff, TIFFTAG_RESOLUTIONUNIT, &resunit ) )
return; return;
float newsize = *size / resvalue; float newsize = *size / resvalue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment