GNOME Bugzilla – Bug 324077
PATCH: don't generate thumbnails with an alpha channel
Last modified: 2006-11-13 22:36:04 UTC
Nautilus HEAD doesn't add any shadowed borders any longer if the thumbnail has an alpha channel. I've filed bugs with patches for both gnome-screenshot and totem-video-thumbnailer (both committed). Evince is the only one left. Problem is that evince's thumbnail code is spread accross multiple files and seems to rely on the fact that the pixbuf is in RGBA.
Created attachment 56059 [details] [review] patch to remove the alpha component from the PDF thumbnail Attached patch removes the alpha channel from the PDF thumbnail. This make nautilus show the thumbnail with the shadowed border again. Also, this actually makes the thumbnail render correctly now. See the attached screenshot. On the desktop, "ajax2-1.pdf" is thumbnailed with the above patch. In the nautilus window the thumbnail is shown using the current code in HEAD. You'll notice the lack of a border and also that the actual text in the thumbnail is white! Finally there's evince itself showing the first page (with black text!). The white text in the old thumbnail is probably somehow due to the alpha channel.
Created attachment 56060 [details] screenshot
Note that the other backend will probably require a similar patch. This patch only fixes the thumbnail behavior for PDFs.
Created attachment 56061 [details] [review] patch with only the relevant changes
Isn't it better to remove alpha in thumbnailer code? Probably we'd like to have internal thumbnails with alpha channel.
Created attachment 56073 [details] [review] More backends to patch
Have you tried to thumbnail the various document types with the patch? I recall seeing some that code that assumed the pixbuf had 4 channels (RGBA) instead of just RGB. Otherwise the patch looks good.
Patch applied, thanks.
*** Bug 345144 has been marked as a duplicate of this bug. ***
*** Bug 374339 has been marked as a duplicate of this bug. ***