From owner-freebsd-questions Thu Mar 20 9:39:57 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4457037B401 for ; Thu, 20 Mar 2003 09:39:56 -0800 (PST) Received: from relay1.ntu-kpi.kiev.ua (oberon.ntu-kpi.kiev.ua [195.245.194.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCCA943F3F for ; Thu, 20 Mar 2003 09:39:50 -0800 (PST) (envelope-from nikolay@asu.ntu-kpi.kiev.ua) Received: by relay1.ntu-kpi.kiev.ua (Postfix, from userid 426) id F233319C40; Thu, 20 Mar 2003 19:39:47 +0200 (EET) Received: from onyx.asu.ntu-kpi.kiev.ua (eth0.onyx.asu.ntu-kpi.kiev.ua [10.18.16.2]) by relay1.ntu-kpi.kiev.ua (Postfix) with ESMTP id 685BB19C41 for ; Thu, 20 Mar 2003 19:39:47 +0200 (EET) Received: from drweb by onyx.asu.ntu-kpi.kiev.ua with drweb-scanned (Exim 4.10) id 18w415-000Cuf-00 for freebsd-questions@FreeBSD.ORG; Thu, 20 Mar 2003 19:39:47 +0200 Received: from nikolay by onyx.asu.ntu-kpi.kiev.ua with local (Exim 4.10) id 18w415-000CuZ-00 for freebsd-questions@FreeBSD.ORG; Thu, 20 Mar 2003 19:39:47 +0200 Date: Thu, 20 Mar 2003 19:39:47 +0200 From: "Nikolay Y. Orlyuk" To: freebsd Subject: Re: convert to jpegs Message-ID: <20030320173947.GD44631@asu.ntu-kpi.kiev.ua> Mail-Followup-To: freebsd References: <20030320163927.GA3768@babylon.polands.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20030320163927.GA3768@babylon.polands.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Mar 20, 2003 at 10:39:28AM -0600, Doug Poland wrote: > On Thu, Mar 20, 2003 at 10:26:55AM -0600, Brian Henning wrote: > > Greetings, > > > > i have a bunch of files of different image formats that i would like to convert > > to jpeg. > > is there a command line converter to be able to do them all in one shot? > > maybe with xv or xnview? > > > The port ImageMagick is your friend But it to slow. Maybe gd will be more faster. I think there is interesting which is `different image formats` I'd like such variant --cut-here-- #!/bin/sh process_dir() { for F in $1/*; do if [ -d "$F" ]; then process_dir "$F" else JF=$(echo "$F" | sed 's/\.[^\.]*$//') case "$F"; in *.gif) gif2jpg "$F" > $JF ;; *.pnm) pnm2jpg "$F" > $JF ;; *.png) png2jpg "$F" > $JF ;; esac fi done --cut-here-- or something like this > > -- With best wishes Nikolay mail: nikolay@asu.ntu-kpi.kiev.ua To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message