Bug 276199

Summary: subpixel rendering support for DjVu
Product: [Applications] okular Reporter: Jaan Vajakas <jaanvajakas>
Component: DjVu backendAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: wishlist CC: hans_meine
Priority: NOR    
Version: 0.12   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

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.)