[okular] [Bug 391625] Okular displays blurry images when opening epub files

Heinz Wiesinger bugzilla_noreply at kde.org
Sat Nov 3 15:54:42 GMT 2018


https://bugs.kde.org/show_bug.cgi?id=391625

--- Comment #6 from Heinz Wiesinger <pprkut at liwjatan.at> ---
I looked into this today and I think I found the root cause of the issue. I
don't know how to fix it though :/

The problem seems to be

setPageSize(QSizeF(600, 800));

This has the effect that images loaded later will be scaled to fit that size.
If they are smaller, they will be scaled up, if they are larger they will be
scaled down. When you view a document at 100%, you're thus not viewing the
image in its original size, but 100% of its scaled version.

I verified this by setting the page size to what is defined in the epub itself
and disabling the scaling altogether. Images were showing fine then.

The problem is that there is no standard for defining the page size for an
epub.
In fact, the epub mentioned earlier doesn't even mention a page size.

I have a Manga epub which defines the page size like this:

<meta content="width=900, height=1350" name="viewport"/>

(which at least seems to be some standard among art books)

and the title page of a novel which looks like this:

<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%"
height="100%" viewBox="0 0 592 871">
<image width="592" height="871" xlink:href="9783838717227_front.jpg"/>
</svg>

On top of this, different pages in the same document can have different sizes.

Not really sure how to go about this :/

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list