Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: thumbnails

by Sinister (Friar)
on Feb 01, 2002 at 00:09 UTC ( [id://142549]=note: print w/replies, xml ) Need Help??


in reply to thumbnails

If you are running on a UN*X box you might want to try to use convert - it can do everything the ImageMagick module can (and more) and is just run on the shell - heck, you can even build a shell script for this. If the thumbnails need to be all of the same size, thinks would look like this:
#!/bin/zsh a=`find $1 -type f | grep -E 'gif|jpg'` for img in $a do echo "found : $img" echo $img | perl -e 'while (<>) { s/(\w+)\.(\w+)$/$1\.thumb\.$2/; pr +int $_ }'\ | while read thumb do convert -scale 50x50 $img $thumb done done
tested and works...

Sinister greetings.
"With tying hashes you can do everything God and Larry have forbidden" -- Johan Vromans - YAPC::Europe 2001
perldoc -q $_

Replies are listed 'Best First'.
Re: Re: thumbnails
by jlongino (Parson) on Feb 01, 2002 at 00:31 UTC
    Could you please specify the version(s) of Unix? It apparently isn't a Solaris command. Nor does it appear to be on FreeBSD.

    Update: D'oh! I should know better than to try to post a quickie from work. See my post below.

    --Jim

      To avoid some confusion, convert is just a command-line front-end to the ImageMagick core. Image::Magick is the perl front-end to the same basic libraries. If installing the core ImageMagick stuff is out, so is convert.

      -Blake

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://142549]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-04-19 05:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found