[ale] How to use xargs correctly to create thumbnails
Wandered Inn
esoteric at denali.atlnet.com
Mon Oct 30 08:32:41 EST 2000
m wrote:
>
> I am trying the move through a directory structure and use ImageMagick's
> convert to create thumbnails. Convert is easy enough to work it requires
>
> #convert -geometry 25% product.jpg product-mini.jpg
>
> However I am not sure how to trangress a direcory structure. I have
> treid something like;
>
> #find /tmp/test -name \product.jpg -print "%h/%f %h/mini-%f\0" | xargs
> -0 -l1 convert -geometry 25%
>
> But can't get it to work. Any suggestions?
I think i picked up some garbage in your post?? Extra characters
following the '-print' or maybe some options I'm not aware of?
Anyway, I suspect your problem is that convert expects a source and
target and xargs is probably passing just a single file name. I don't
really have time to play with this, but you can try the following
instead:
for fn in $(find /tmp/test -name product.jpg -print); do
convert -geometry 25% $fn $fn
done
Not as pretty, but should suffice, I think.
>
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
--
Until later: Geoffrey esoteric at denali.atlnet.com
"Great spirits have always found violent opposition from mediocre minds.
The
latter cannot understand it when a man does not thoughtlessly submit to
hereditary prejudices but honestly and courageously uses his
intelligence."
- Albert Einstein
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list