Bug 274910 - Needs PDF image smoothing
Summary: Needs PDF image smoothing
Status: RESOLVED UPSTREAM
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: 0.12.2
Platform: Debian unstable Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-04 14:10 UTC by Christopher Martin
Modified: 2012-09-04 08:47 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
PDF with images that illustrate image smoothing (437.04 KB, application/pdf)
2011-06-04 15:15 UTC, Christopher Martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Martin 2011-06-04 14:10:20 UTC
Version:           0.12.2 (using KDE 4.6.3) 
OS:                Linux

Adobe Reader uses some sort of filtering on images embedded in PDFs to smooth them, so that as the user zooms up and down, they look reasonable.

In Okular, by contrast, embedded images (presumably bitmap formats) look pixelated, which is unattractive and can also make it hard to discern details. Some sort of image smoothing would thus be a welcome feature that would bring Okular closer to parity with Adobe Reader.

Thanks.

Reproducible: Always

Steps to Reproduce:
View a PDF in Okular that contains embedded images (probably bitmap format images).

Actual Results:  
Image is pixelated.

Expected Results:  
Image should be filtered so as to look reasonable at all zoom levels.
Comment 1 Albert Astals Cid 2011-06-04 14:29:21 UTC
Attach a PDF in which you'd want that feature to be implemented
Comment 2 Christopher Martin 2011-06-04 15:15:05 UTC
Created attachment 60617 [details]
PDF with images that illustrate image smoothing

The National Geographic logo on the last page illustrates the issue. Using Adobe Reader (and with Preferences -> Page Display -> Image Smoothing turned on) the letters of the text in the image are slightly blurred. With Okular, this doesn't happen.

Blurring text isn't much of a feature, but if you look at larger images elsewhere in the document, you can see that Adobe Reader's image smoothing gives the images a slightly more natural feel by hiding pixelation to an extent (compare the wires in the first page image, for instance).

Thanks.
Comment 3 Davor Cubranic 2011-06-11 04:01:36 UTC
Doesn't this sound like it would be a Poppler issue, though?
Comment 4 Albert Astals Cid 2011-06-11 20:08:56 UTC
If you want to implement it only for PDF, probably, if you want to implement it for all the formats Okular supports, no
Comment 5 Ettore Atalan 2011-06-26 09:52:27 UTC
Implementing it for all formats would be better.

The Eye of Gnome is already smoothing pictures when zooming in.
Comment 6 Murz 2011-08-02 07:07:17 UTC
Evince from gnome do the smooth for all images, so if we have 95% of zoom, it looks normally.
But Okular show images without smooth, so it looks ugly. 
Here is comparsion: http://wstaw.org/m/2011/08/02/plasma-desktopU23792.jpg
Left side is Evince, right - Okular.

In Evince images looks much better.

Okular already can do the smooth images, if we look at single image: http://wstaw.org/m/2011/08/02/plasma-desktopc23792.jpg
But when image is into pdf, this render method is not enabled.
So we must only enable smooth for pdf images.

But maybe some people wants look on images without smooth. To solve problem for both sides, will be good to add the option in Okular for changing method of render all images method: Smooth images or display without Smooth. Maybe do this settings global for images and pdf.
Comment 7 Ralph Moenchmeyer 2011-08-22 08:51:34 UTC
I use KDE 4.7 on an OPensuse 11.4 system. Today, I had a look at PDF documents generated from Libreoffice with screenshots from some web pages included. I was almost shocked by the bad image quality Okular produced. So I had a look at other PDF viewers. 

The absolutely best image qualities regarding smoothing were given by "evince" and "ePDFviewer" - and in contrast to other viewers for all zoom factors ! It looks as if "evince" and "ePDFviwer" use the same smoothing and zoom methods. 

Adobe's Reader in my case only produces smooth images for zoom factors 150% and larger. Below the quality is also bad. 

XPDF's results are as bad as Okular's.   

So when implementing smoothing and zooming methods within Okular for images one should adapt the smoothing/zooming technology of "evince" and "ePDFviewer".
Comment 8 Thomas 2012-08-27 16:23:45 UTC
Bug still exists in KDE 4.9 (archlinux)
Comment 9 Christoph Feck 2012-08-27 16:41:17 UTC
Albert, did I understand comment #4 correctly, that the poppler engine doesn't return the entire page as a single bitmap, so that it would be possible to apply a different scaling algorithm for the embedded images, not affecting text?

If yes, I maybe can contribute the "reverse anti-aliasing" scaling algorithm.
Comment 10 Albert Astals Cid 2012-08-27 17:12:46 UTC
@Christoph: No, the page is returned as a single bitmap. To be honest i was probably trolling in that comment, it's most probably impossible to scale anything at the Okular level.
Comment 11 Albert Astals Cid 2012-08-27 17:33:15 UTC
There is nothing Okular can do here.

https://bugs.freedesktop.org/show_bug.cgi?id=22138 for the poppler bug
Comment 12 Thomas 2012-09-04 08:19:34 UTC
Temporary solution for people using arch linux: "poppler-qt-lcd" package from the AUR. It replaces poppler-qt and utilizes cairo for rendering like evince does. Hence the images will look smooth. see here: https://dl.dropbox.com/u/207133/okular_image_smoothing.jpg

Maybe there are similar packages in other distros.
Comment 13 Albert Astals Cid 2012-09-04 08:32:02 UTC
Of course you get all the other bugs the poppler-cairo rendering engine has and the poppler-splash one does not, but hey you know better than us!
Comment 14 Thomas 2012-09-04 08:47:38 UTC
I did not mean to offend you. I am sorry for that.