Bug 276199 - subpixel rendering support for DjVu
Summary: subpixel rendering support for DjVu
Status: REPORTED
Alias: None
Product: okular
Classification: Applications
Component: DjVu backend (show other bugs)
Version: 0.12
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 15:16 UTC by Jaan Vajakas
Modified: 2011-08-02 08:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaan Vajakas 2011-06-21 15:16:45 UTC
Version:           0.12 (using KDE 4.6.0) 
OS:                Linux

Currently djvu images are quite blurry when viewed at a small zoom level (especially if the zoom level is not a unit fraction). It would be nice if okular supported subpixel rendering like WinDjView-subpix does (http://code.google.com/p/windjview-subpix/).

Looking at the code of WinDjView-subpix, it seems that there the problem is solved by requesting an image at 100% resolution from libdjvu and then scaling it (subpixel-consciously) to the appropriate size. So the fastest and simplest approach to get it done would be to follow the same approach, copy-pasting code from WinDjView-subpix (however, architecturally, there might be better choices, so that one could avoid copying code between projects: on one hand, this functionality could be included in libdjview, since this would be useful in every DjVu viewing application; on the other hand, subpixel-conscious scaling would probably also useful in some other raster formats that okular supports).

And then there should be some user interface option to enable/disable subpixel rendering as well.


Reproducible: Always

Steps to Reproduce:
Open a DjVu document. Set zoom level to some level that is less than 100%.


Actual Results:  
The image is blurrier than it could be because the smoothing algorithm does not care about subpixels. The blurriness is especially apparent if the zoom level a non-unit fraction (i. e. a number <100% that is not 100%/n where n is an integer), e. g. 18%.


Expected Results:  
DjView should use subpixel rendering (like WinDjView-subpix) to increase sharpness.
Comment 1 Hans Meine 2011-08-02 08:55:08 UTC
Maybe you could attach screenshots that allow a potential before / after comparison?  That would make it easier to rate the severity / see the point.
(Disclaimer: I won't implement this anyhow.)