[poppler] thumbnails

Shawn Rutledge shawn.t.rutledge at gmail.com
Thu May 28 15:18:17 PDT 2009


On Wed, May 20, 2009 at 1:33 PM, Albert Astals Cid <aacid at kde.org> wrote:
>> > Right, the Qt4 bindings don't expose thumbnail reading, if you'd like to
>> > have them, do you think you can contribute a patch?
>>
>> Probably I could, I'm familiar enough with Qt although haven't looked
>> at the implementation of those bindings yet.  Can you give a general
>> outline how to get the thumbnails using core?
>
> See loadThumb Page.h that should give you the data of the thumbnail, once you
> have it you just create a QImage with it and return it to the user.

So far the thumbnail images seem to be 24-bit RGB; I don't know if
that's always going to be true.  Here's a patch which makes the
assumption that they always will be.

I tested it by modifying the demo program to have a thumbnails dock
window, using the usual QTableView, which isn't so great because
QIcons in a QTableView are a rather tiny size by default, but at least
you can see that the thumbnails got generated correctly.  I will try
to use a QGraphicsView in my own program for that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thumbnails-screenshot.png
Type: image/png
Size: 156574 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090528/1d91b97c/attachment-0001.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new-files.tgz
Type: application/x-gzip
Size: 1443 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090528/1d91b97c/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt-thumbnails.patch
Type: text/x-diff
Size: 2984 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/poppler/attachments/20090528/1d91b97c/attachment-0001.patch 


More information about the poppler mailing list