Bug 177011

Summary: Rendering large PNG fails when zoom >= 84%
Product: [Applications] okular Reporter: Benoît Jacob <jacob.benoit.1>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: vdboor
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Benoît Jacob 2008-12-05 20:56:34 UTC
Version:            (using Devel)
Compiler:          gcc 4.3.0 
OS:                Linux
Installed from:    Compiled sources

I'm viewing this large PNG image:
http://hemswell.lincoln.ac.uk/~padams/kde-413.png

When I set a zoom level >= 84%, nothing gets rendered and I can only see a blank white document. 

At lower zoom level, after a few CPU-intensive seconds, the document renders correctly. Even at 83.5%.

Some libpng version information:
gaston@kiwi:~$ ldd prefix/bin/okular | grep png
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb6622000)
gaston@kiwi:~$ ls -l /usr/lib/libpng12.so
lrwxrwxrwx 1 root root 18 2008-03-25 20:49 /usr/lib/libpng12.so -> libpng12.so.0.15.0
Comment 1 Pino Toscano 2008-12-05 21:15:25 UTC
This is the same case as bug #173681, even if does not look at a first glance.
The reason behind both is the same: Okular does not render (by choice) "big pages" to avoid to take too much memory.

*** This bug has been marked as a duplicate of bug 173681 ***
Comment 2 Pino Toscano 2008-12-05 21:16:01 UTC
(Also, you might want to use a real image viewer, as Okular is not an image viewer.)
Comment 3 Benoît Jacob 2008-12-05 21:36:09 UTC
Heh. Either you support a feature or you don't.

If you want to support PNG's but only small enough or at small enough zoom, then you need to do something else than just failing silently.

Maybe an error message in the GUI explaining the situation and proposing instead to open the image in the default application for this mimetype (which I suppose would be Gwenview).
Comment 4 Albert Astals Cid 2008-12-05 22:14:10 UTC
okular launching gwenview? why would you want to do that, if you use okular you get what okular provides, if you don't like it, don't use it and use gwenview :-)
Comment 5 Benoît Jacob 2008-12-06 04:12:41 UTC
ok ok that's your call :)

but in any case: if okular claims to be able to open image files, and it turns out that it can't open all of them at any zoom level, then user.isConfused(). So at least, a user-visible error message, or something like that.

I then thought that, seeing this message, the next thing that the user would do, would be to open the same file with the default image viewer. So I thought, why not just allow him to do it in 1 click from the error msg.

But that's just my 2 cents :)
Comment 6 Diederik van der Boor 2008-12-07 13:23:39 UTC
Since Gwenview can render those images, would it be possible to share the code wich makes this possible

(as noted in bug 173681, this also hits PDF files).