[SWLUG] BMP to JPG

Telsa Gwynne hobbit at aloss.ukuu.org.uk
Sat Apr 26 08:26:53 UTC 2003


On Fri, Apr 25, 2003 at 07:54:36PM +0100 or thereabouts, justin at discordia.org.uk wrote:
 
> 1. As already stated, 'convert' from the ImageMagick packages.
> which will also let you transform, scale, draw on, and just about
> anything else you could ever want to do in a shell script.

Other nice capability from ImageMagick. 

In ~/.mailcap, I have,

# From Laurel on Linuxchix for lynx and pictures
image/jpeg; display '%s'; test=test -n "$DISPLAY"
image/gif;  display '%s'; test=test -n "$DISPLAY"
image/png;  display '%s'; test=test -n "$DISPLAY"

Run Lynx in X, follow a link to a file that's a picture, and
instead of "it's a picture, download or cancel?" prompt get
an ImageMagick window with the pic in it.

I actually find myself typing "display somefile.jpg" instead
of starting gimp or pho or xv or gqview or whatever these days: 
way faster!

> 2. the netpbm-progs toolset,  using bmptoppm and ppmtojpeg
> eg.  bmptoppm one.bmp | ppmtojpeg > one.jpg
> and you can slot in any of the other ppm,pbm,pgm tools you want
> 
> 3. The tools from libjpeg
> eg.  cjpeg one.bmp > one.jpg 

Hadn't met that one. Handy.

Telsa




More information about the Swlug mailing list