phsdv Guru
Joined: 13 Mar 2005 Posts: 372 Location: Europe
|
Posted: Sun May 01, 2005 7:20 pm Post subject: [solved] ROX thumbnails of raw camera files |
|
|
I am trying to show thumbnails of my raw camera files in ROX-Filer. But I am running in some trouble. I have defined a new mime type with mime-editor: image/x-nef (nef is the Nikon raw format). Secondly I have made the following file:
~/.Choices/MIME-thumb/image_x-nef Code: | #! /bin/sh
# $1 is input file name, $2 output file name, $3 is icon size
size="$3"x"$3"
echo $1 $2 $3
exec ~paul/bin/nefextract "$1" | convert -flatten -size $size -resize $size - "$2"
| When I open rox from a xterm and go to a directory with some nef files, I see that the image-x-nef script is called. The thumbnail files are generated correclty and are placed in ~/.thumbnails/normal/ So everything looks OK, but rox does not show thumbs for the nef files. I am using: rox: 2.2.0 and xfce4.2
Anybody an idea what else I have to do to get this working?
[Edit]
I found an util: MagicThumbnail that does something similar. To show the bitmaps I had to include some metadata within the thumb: Code: | {'tEXt::Thumb::Image::Width': str(ow),
'tEXt::Thumb::Image::Height': str(oh),
"tEXt::Thumb::Size": str(s.st_size),
"tEXt::Thumb::MTime": str(s.st_mtime),
'tEXt::Thumb::URI': 'file://'+inname,
'tEXt::Software': 'MagicThumbnail'}) |
Now I have something working, but it is slow. I'll try to optimize a bit. And if there is an interrest I can post my solution. |
|