You are currently viewing a single post of this guestblog.

Click here to go back the complete page. I would be glad to hear your comments, so don’t hesitate to leave me your feedback below. It will appear on the main guestblog page.

in categories  linux  opensource  permalink:  79   posted on 20.07.2014 2:56
From Yorik

HDR thumbnailer

This is a note to myself in case I need it again in the future...

pcmanfm, my favorite file manager, uses the gnome3 thumbnailing system, which makes it very easy to write thumbnailers for new filetypes. Thumbnailers are small programs that take a file of a certain type, and create a small png image of it. So in this example, I'm using imagemagick, the famous image conversion tool that you'll find on almost any linux distro, to make a thumbnailer for HDR images. The thumbnailer is composed of two files:

hdr.thumbnailer (place it in /usr/share/thumbnailers or ~/.local/share/thumbnailers):
[Thumbnailer Entry]
Exec=imagemagick-thumbnailer %i %o %s

imagemagick-thumbnailer (place it in /usr/bin or any other folder that is in your binary search path):
/usr/bin/convert "$1" -thumbnail 64x64 -gravity center -background white -extent 48x48  png:"$2"

One last thing, I suggest you delete /usr/share/mime/packages/kde.xml (installed by kdelibs5-data) because it horribly messes with several file formats (such as HDR) and the mime system doesn't recognize them anymore.

First and foremost, your name:

And your message:

To publish it, just press this ...