Skip to Content.
Sympa Menu

baslinux - Re: [BL] script to shrink photos

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: 3aoo-cvfd AT dea.spamcon.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] script to shrink photos
  • Date: Tue, 27 Dec 2005 19:51:20 +1300

Sindi wrote:
>
> how can I shrink all the files in a directory with one command or script?

To which David replied:
>
> jpegtopnm infile.jpg | pnmscale .5 | pnmtojpeg >outfile.jpg
>
> You need to put this in a 'for' loop in order to process multiple files
> at once.

for i in * ; do jpegtopnm $i | pnmscale .5 | pnmtojpeg >$i.new ; done

Cheers,
Steven

____________________________
http://www.basiclinux.com.ru




Archive powered by MHonArc 2.6.24.

Top of Page