[ale] Making JPEG indexes under Linux

Pete Hardie pete.hardie at dvsg.sciatl.com
Fri Nov 12 08:35:05 EST 1999


This is a multi-part message in MIME format.
--------------27C412ED2E46C8ABD66A99D7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Thompson Freeman wrote:
> 
> I recently obtained one of the Sony Mavecia cameras which stores the
> pictures as *jpg files on floppies, and have run into a slight challenge
> which I didn't forsee. Under Linux, is there a _simple_ way to create an
> index/contact sheet/thumbnail sheet (I'm not even sure what they are
> called!) from stored JPEGs?

Attached is a short shell script that creates and HTML file of thumbnails.
It does not correctly size them, but I'm sure that a quick look at the
JPEG format would reveal the section that saves the dimensions of the image,
which could be added to this.



-- 
Pete Hardie                   |   Goalie, DVSG Dart Team
Scientific Atlanta            |
Digital Video Services Group  |
--------------27C412ED2E46C8ABD66A99D7
Content-Type: application/x-sh; name="image_html.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="image_html.sh"

#!/bin/sh

# generates 50x50 image blocks from a directory of image files
# and sets up the html file for this

if [ $# -gt 2 ]
then
	echo "Usage:  image_html.sh"
	echo "        image_html.sh [image directory]"
	echo "        image_html.sh image directory [output file]"
	exit
fi

OUTFILE=output.html
SOURCE_DIR=images

if [ $# -eq 1 ]
then
	SOURCE_DIR=$1
fi

if [ $# -eq 2 ]
then
	SOURCE_DIR=$1
	OUTFILE=$2
fi

>$OUTFILE

echo "<HTML>" >>$OUTFILE
echo "<HEAD>" >>$OUTFILE
echo "</HEAD>" >>$OUTFILE
echo "<BODY>" >>$OUTFILE

for i in `ls $SOURCE_DIR`
do
	#echo "<img src=\"$SOURCE_DIR/$i\" alt=\"image $i\" height=50 width=50>" >> $OUTFILE
	echo "<a href=\"$SOURCE_DIR/$i\"> <img src=\"$SOURCE_DIR/$i\" alt=\"image $i\" height=50 width=50>$SOURCE_DIR/$i</a>" >> $OUTFILE
done
echo "</BODY>" >>$OUTFILE
echo "</HTML>" >>$OUTFILE

--------------27C412ED2E46C8ABD66A99D7--






More information about the Ale mailing list