*** empty log message ***
authorMatthew Mondor <mmondor@pulsar-zone.net>
Sun, 5 Nov 2006 11:55:40 +0000 (11:55 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Sun, 5 Nov 2006 11:55:40 +0000 (11:55 +0000)
mmsoftware/js/js-sh/app/thumb/thumb.js

index 3755995..d0bcaf9 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: thumb.js,v 1.2 2006/11/05 11:14:56 mmondor Exp $ */
+/* $Id: thumb.js,v 1.3 2006/11/05 11:55:40 mmondor Exp $ */
 
 /*
  * Copyright (c) 2006, Matthew Mondor
  * - Work on better presentation
  */
 
+function thumbnail_jpeg(fh)
+{
+       this.jpeg(fh, 50);
+}
+
 function thumbnail(from, to, xmax, ymax)
 {
        var ofh, oimg, ox, oy, timg, tfh;
@@ -25,7 +30,7 @@ function thumbnail(from, to, xmax, ymax)
        /* Set load and save functions relative to image file type */
        if (from.match(/\.jpg$|\.jpeg$/)) {
                GD.load = GD.createFromJpeg;
-               GDImage.prototype.save = function(fh) { this.jpeg(fh, 50) };
+               GDImage.prototype.save = thumbnail_jpeg;
        } else if (from.match(/\.png$/)) {
                GD.load = GD.createFromPng;
                GDImage.prototype.save = GDImage.prototype.png;
@@ -165,4 +170,4 @@ function thumbnail_dir(path, xmax, ymax)
        return ret;
 }
 
-thumbnail_dir('/home/data/jshttpd/mmondor/testimg', 128, 128);
+thumbnail_dir('/home/data/jshttpd/mmondor/testimg', 64, 64);