Bug 162934 - Non-square pixels (e.g. for FAX) are not handled properly.
Summary: Non-square pixels (e.g. for FAX) are not handled properly.
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: TIFF backend (show other bugs)
Version: 0.6.3
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-31 06:38 UTC by Steve Underwood
Modified: 2008-05-31 13:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Simple FAX Tiff file (537 bytes, image/tiff)
2008-05-31 11:17 UTC, Steve Underwood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Underwood 2008-05-31 06:38:53 UTC
Version:           0.6.3 (using KDE 4.0.4)
Installed from:    Fedora RPMs
OS:                Linux

The distros are dropping kfax for okular as their FAX reader. Its a good FAX viewer tool, except for one killer....

Okular seems to ignore the pixel resolution information in a TIFF file, and assumes pixels are square. This means a fine resolution FAX (pixels are almost 1:1) looks OK, but a standard or super-fine resolution FAX (pixels are about 2:1 or 1:2 geometry) appears badly squashed in the y or x direction. This is a problem with quite a few image viewers, but it makes them unacceptable as FAX viewers.
Comment 1 Pino Toscano 2008-05-31 10:56:34 UTC
Do you have a sample document which shows the issue?
Comment 2 Steve Underwood 2008-05-31 11:17:55 UTC
Created attachment 25026 [details]
Simple FAX Tiff file

Attached is the simplest possible test TIFF file - a plain white standard
resolution A4 FAX page. When displayed in okular it looks much wider than it is
high. However, using tiffdump on the file you will see that it is as follows:

ImageWidth (256) SHORT (3) 1<1728>
ImageLength (257) SHORT (3) 1<1100>
ResolutionUnit (296) SHORT (3) 1<2>
XResolution (282) RATIONAL (5) 1<204>
YResolution (283) RATIONAL (5) 1<98>

Now, 1728 pixels wide at 204 per inch is 8.47 inches wide, and 1100 lines at 98
per inch is 11.22 inches long. The image should actually be the shape of a
normal A4 page.
Comment 3 Pino Toscano 2008-05-31 12:38:19 UTC
Thanks for the test case, useful indeed; would you mind adding some graphics to it, so I can test the rendering as well?
Comment 4 Pino Toscano 2008-05-31 13:39:13 UTC
Oh, found one in an old email :)
Comment 5 Pino Toscano 2008-05-31 13:41:18 UTC
SVN commit 814835 by pino:

If a directory in a TIFF carries information about the resolution, use them to calculate its real size.
And, when generating a pixmap, request the RGBA image of the original size.
BUG: 162934


 M  +30 -2     generator_tiff.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=814835
Comment 6 Pino Toscano 2008-05-31 13:41:44 UTC
SVN commit 814836 by pino:

Backport:
If a directory in a TIFF carries information about the resolution, use them to calculate its real size.
And, when generating a pixmap, request the RGBA image of the original size.
CCBUG: 162934


 M  +30 -2     generator_tiff.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=814836