[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
Neil Winchurst wrote:
> not yet found a program which will automatically scale down the photos.
> All I need is a program to transfer the photos, scaled down in size (ie
> number of pixels), which I can *quickly* transfer to an internet site so
> that the wife can look at the photos on her computer.
ImageMagick convert
#----------------------------------------
thumbs.sh
for img in `ls *.JPG`
do
#convert -sample 10%x10% $img thumb_$img
convert -resize 200x200 $img thumb_$img
done
for img in `ls *.jpg`
do
#convert -sample 10%x10% $img thumb_$img
convert -resize 200x200 $img thumb_$img
done
#-----------------------------------------
For raw image files use the feature to extract the JPEG of about 1MByte
that is buried in there, and/or scale it to convenient size - probably
1000 * 700 nowadays for screens and SLRs, slightly different proportions
for some compacts I think 4:3 or whatever.
# ---------------------------------------------------
<ul>
<?php
// Load up array with file names!
$handle = opendir(".");
$array_indx = 0;
while (false !== ($file = readdir($handle)))
{
// lose . and .. from here though ...
$dir_array[$array_indx] = $file;
$array_indx ++;
}
// now do things with the array contents
foreach ($dir_array as $n)
{
if ($n==".") {}
else {
if($n==".."){}
else{
//Don't look for thumbnails of thumbnails
if(substr($n,0,5)=='thumb'){}
else{
print " <a href='".$n."'><img
src='thumb_".$n."'></a> "." ";
}
}
}
}
?>
# -------------------------------------------------------------
--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html