[Goodies-commits] r2995 - in thunar-thumbnailers/trunk: . raw-thumbnailer

Erlend Davidson erland at xfce.org
Mon Aug 13 16:58:37 CEST 2007


Author: erland
Date: 2007-08-13 14:58:37 +0000 (Mon, 13 Aug 2007)
New Revision: 2995

Modified:
   thunar-thumbnailers/trunk/ChangeLog
   thunar-thumbnailers/trunk/configure.in.in
   thunar-thumbnailers/trunk/raw-thumbnailer/raw-thumbnailer
Log:
* Implemented raw-thumbnailer (http://code.google.com/p/raw-thumbnailer) for thumbnailing of raw images - much faster

Modified: thunar-thumbnailers/trunk/ChangeLog
===================================================================
--- thunar-thumbnailers/trunk/ChangeLog	2007-08-13 11:36:34 UTC (rev 2994)
+++ thunar-thumbnailers/trunk/ChangeLog	2007-08-13 14:58:37 UTC (rev 2995)
@@ -1,3 +1,7 @@
+2007-08-13	Erlend Davidson <Erlend.Davidson at gmail.com>
+
+	* Implemented raw-thumbnailer (http://code.google.com/p/raw-thumbnailer) for thumbnailing of raw images - much faster
+
 2007-08-07	Erlend Davidson <Erlend.Davidson at gmail.com>
 
 	* Added an SVGZ (compressed svg) thumbnailer

Modified: thunar-thumbnailers/trunk/configure.in.in
===================================================================
--- thunar-thumbnailers/trunk/configure.in.in	2007-08-13 11:36:34 UTC (rev 2994)
+++ thunar-thumbnailers/trunk/configure.in.in	2007-08-13 14:58:37 UTC (rev 2995)
@@ -49,6 +49,11 @@
    [ --enable-raw Enables thumbnailing of the Raw images used by some digital cameras (requires dcraw). ],
    enable_raw=yes)
 if test "$enable_raw" = "yes"; then
+    dnl *** check to see if raw-thumbnailer, needed for raw image thumbnailing, is on the path ***
+    AC_PATH_PROG(RAWTHUMBNAILER, raw-thumbnailer)
+	if test -z "$RAWTHUMBNAILER"; then
+	AC_MSG_ERROR([Install raw-thumbnailer (http://code.google.com/p/raw-thumbnailer) before enabling raw image thumbnailing])
+    fi
     dnl *** check to see if dcraw, needed for raw image thumbnailing, is on the path ***
     AC_PATH_PROG(DCRAW, dcraw)
 	if test -z "$DCRAW"; then

Modified: thunar-thumbnailers/trunk/raw-thumbnailer/raw-thumbnailer
===================================================================
--- thunar-thumbnailers/trunk/raw-thumbnailer/raw-thumbnailer	2007-08-13 11:36:34 UTC (rev 2994)
+++ thunar-thumbnailers/trunk/raw-thumbnailer/raw-thumbnailer	2007-08-13 14:58:37 UTC (rev 2995)
@@ -16,7 +16,7 @@
 #  along with this program; if not, write to the Free Software
 #  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
-# dcraw-thumbnailer - Thumbnailer script for RAW files.
+# raw-thumbnailer - Thumbnailer script for RAW files.
 #
 # Usage: dcraw-thumbnailer raw-file png-file size
 #
@@ -26,5 +26,13 @@
 ofile=$2
 size=$3
 
-# invoke convert (ImageMagick)
-exec dcraw -c -e "$ifile" | convert - -scale "$sizex$size" "png:$ofile"
+# first try raw-thumbnailer (since it is MUCH faster)
+raw-thumbnailer -s "$size" -i "$ifile" -o "$ofile"
+
+# now see if it worked (it doesn't support all that dcraw supports yet)
+if [ $? -ne 0 ]; then
+    echo "Falling back to dcraw"
+    exec dcraw -c -e "$ifile" | convert - -scale "$sizex$size" "png:$ofile"
+else
+    exit 0
+fi




More information about the Goodies-commits mailing list