From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu From: mirtchov@cpsc.ucalgary.ca MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] cjpeg/djpeg Date: Thu, 11 Dec 2003 09:11:51 -0700 Topicbox-Message-UUID: 9f69f5ea-eacc-11e9-9e20-41e7f4b1d025 the jpeg library port which comes with the Links package has two programs, cjpeg and djpeg, whose usefulness I have neglected up until last night. the programs are not installed on your system by default, but if you do a: cp links-ape/jpeg/8.cjpeg $home/bin/386/ then you can have a very simple 'tojpg' script as follows: plan9% cat /bin/tojpg #!/bin/rc file='' switch ($#*) { case 1 file=$1 } toppm $file | cjpeg plan9% or a 'jpg' script that looks like this (after copying the djpeg binary): plan9% cat /bin/jpg2 #!/bin/rc file='' switch ($#*) { case 1 file=$1 } djpeg $file | ppm plan9% andrey