convert to jpegs

2003-03-20 Thread Brian Henning
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?

Thanks,
brian

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message


Re: convert to jpegs

2003-03-20 Thread Doug Poland
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

-- 
Regards,
Doug

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message


Re: convert to jpegs

2003-03-20 Thread Nikolay Y. Orlyuk
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: [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message


Re: convert to jpegs

2003-03-22 Thread Dirk-Willem van Gulik


On Thu, 20 Mar 2003, Brian Henning wrote:

> 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?

ImageMagic is one route; the URT or netPBM toolkit the other. With the
latter two you can do

for i.tiff in *
do
j=`basename $i .tiff`
cat $i tifftopnm | pnmscale 0.5 | cjpeg > $j.jpg
done

and so on. Combined URT and NetPBM support just about any format.

The Utah Raster Toolkit (urt) is a bit more advanced and very suitable for
scientific work where values and geoms are important; for visual work
netpbm is just fine.

Dw.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message