To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.trains.orgOpen lugnet.trains.org in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Trains / Train Organizations / 146
145  |  147
Subject: 
Re: Soft Opening
Newsgroups: 
lugnet.trains.org, lugnet.publish
Followup-To: 
lugnet.publish
Date: 
Fri, 5 Nov 1999 16:23:03 GMT
Viewed: 
1990 times
  
[ XFUT lugnet.publish ]

Steve:

On Mon, 1 Nov 1999 18:08:54 GMT, "John Gerlach"
<john.gerlach@bestbuy.com.nospam> wrote:

I'll jump in and reply here - that 'shadow' text is from
the tool John used to create the thumbnails.  If anyone
knows of a good tool - preferably 'freeware' <grin> - to
create thumbnail images, let us know!

ImageMagick will do mass thumbnails.  Maybe not as
auto-magically as some other tools, but it's free, and it
runs on any platform.

If you just need a fixed rescaling and have access to a
machine with netpbm/pbmplus and (t)csh, you can use the
following script:

#!/bin/tcsh
#
# This script makes scaled down versions (30%) of the images
# passed to it.
# It assumes that all the images are stored in JPEG format
# and that their names end by ".jpeg".

foreach image ($*)
   set name=`basename $image .jpeg`

   djpeg < $image | pnmscale 0.30 | cjpeg > $name\-inline.jpeg
end

# end of script

IMO this is not the right way to mage thumbnails though.
Generally I prefer to scale the image down to about 30% of
its original area (55% on a linear scale), and then choose
the most representative 30% (area again) of the scaled image
for the thumbnail. This also allows me to have the same
width/height/aspect ratio on all the thumbnails if I want
that.

The following is my script for scaling and cropping to a
fixed thumbnail size with equal amounts of scaling and
cropping. It is not perfect, but I haven't found anything
more efficient yet.

------------------------------------------------------------
--  Save as "produkt":

#!/bin/tcsh
awk "BEGIN{ print $1 * $2 }"

------------------------------------------------------------
--  Save as "interaktive_thumbnails":

#!/bin/tcsh
#
# This script makes scaled down versions (30%) of the images
# passed to it.
# It assumes that all the images are stored in JPEG format
# and that their names end by ".jpeg".

set height=100
set width=100

foreach image ($*)
   set name=`basename $image .jpeg`

   set dimensions=`djpeg < $image | head -n 2 | tail -n 1`
   set area=`./produkt $dimensions`

   set factor=`awk "BEGIN{ print sqrt (sqrt ($height * $width / $area)) }"`

   djpeg < $image | pnmscale $factor > intermediate.ppm

   echo -n "Crop the image to something slightly larger than $width x $height"
   echo   " pixels and save the image with the same name..."

   xv intermediate.ppm

   pnmcut 0 0 100 100 < intermediate.ppm | cjpeg > $name\-inline.jpeg
end

rm -f intermediate.ppm

------------------------------------------------------------

Play well,

Jacob

      ------------------------------------------------
      --  E-mail:        sparre@cats.nbi.dk         --
      --  Web...:  <URL:http://www.ldraw.org/FAQ/>  --
      ------------------------------------------------



Message is in Reply To:
  Re: Soft Opening
 
(...) ImageMagick will do mass thumbnails. Maybe not as auto-magically as some other tools, but it's free, and it runs on any platform. Steve (25 years ago, 1-Nov-99, to lugnet.trains.org)

7 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR