Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: thumbnails generator

by oko1 (Deacon)
on Apr 20, 2008 at 16:25 UTC ( [id://681798]=note: print w/replies, xml ) Need Help??


in reply to Re^2: thumbnails generator
in thread thumbnails generator

Actually, it is indeed accomplished very easily. The fact that it's so complicated in your script is a demonstration that you're coercing a square peg into a round hole.

size=`/usr/bin/identify "$image"|/usr/bin/cut -d' ' -f 3` /usr/bin/convert -geometry "$size" "$old_name" "$new_name"

-- 
Human history becomes more and more a race between education and catastrophe. -- HG Wells

Replies are listed 'Best First'.
Re^4: thumbnails generator
by Fletch (Bishop) on Apr 21, 2008 at 12:31 UTC

    Of course given a better shell you can do even more inline:

    size=${=${$(identify "$image")}[3]}

    (And people say Perl is executable line noise . . . :)

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-19 14:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found