Graphics Formats for Linux
Having looked at some of the common graphics formats, we finish up with a quick look at some available programs and libraries for converting images.
xv and ImageMagick
These two X programs display, convert, and manipulate images. xv can read and write JPEG, GIF, TIFF, PBM/PGM/PPM, and X formats, although it cannot display 24bit images as 24bit. In addition to format conversions, xv can perform simple image manipulations, e.g., rotate, flip, crop, magnify, and gamma correction. ImageMagick supports the formats xv does, plus TGA. It can send output directly to a postscript printer and has more image manipulation capabilities than xv: cut, copy, paste, resize, flip, flop, rotate, invert, emboss, and more, on the whole or on part of the image.
The canonical way to view and convert from PostScript (including EPS) is ghostscript. Ghostscript operates both from the command line options and interactively. Input is always a PostScript file and output may be any of several different file formats, printer languages, or screen types. By default, ghostscript sends its output to an X terminal, but it can also save images to file. Ghostview is a popular front end for ghostscript that improves the screen handling.
The PBMPLUS utilities are a set of 120 programs for image conversion and manipulation. PBMPLUS defines three intermediate formats: PBM, PGM, and PPM (see listing above). The basic philosophy is that if there are twenty formats, you need twenty squared, or 400, programs/subroutines to convert between them. The use of intermediate formats reduces that number to two times twenty, or forty. In addition to the conversion programs, there are a number of simple image processing programs: scaling, rotating, smoothing, convolution, gamma, cropping and more. NETPLUS is a newer version of PBMPLUS, but some versions suffer from serious bugs.
C Library support
Substantial support exists for C programmers working with graphics. Libraries for JPEG/JFIF, TIFF, and PNG are now available. In addition, code fragments for many of the other formats are readily available from Internet archive sites.
IJG JPEG/JFIF library
The easiest way to do JPEG programming is to use the Independent JPEG Group's (IJG) library. This library is based on the JFIF specification and includes two common programs found on many Unix systems for storage and retrieval of JFIF images: cjpeg and djpeg. The library is available as source and compiled code.
SGI TIFF library
Like the JPEG library, a full set of routines to implement TIFF is available. Written by Sam Leffler and SGI, this library is also available as source and compiled code. The library includes programs for converting, dithering, splitting, and displaying information on TIFF files.
With the recent announcement of support for the PNG format, Compuserve also announced a PNG toolbox. The toolbox uses the zlib library for the LZ77 code and is intended to speed the acceptance of the new format. Its use will be free of royalties. A beta version is available on Compuserve.
There are several archive sites on the Internet where programs and further information can be found:
anonymous ftp sites:ftp://sgi.com/graphics/tiff TIFF version 6.0 specification and the source for the SGI TIFF libraryftp://sunsite.unc.edu/pub/Linux/apps/graphics/convert PBMPLUSftp://sunsite.unc.edu/pub/Linux/X11/xapps/graphics ImageMagickftp://sunsite.unc.edu/pub/Linux/libs/graphics Compiled version of JPEG and TIFF libraries for Linuxftp://sunsite.unc.edu/pub/Linux/apps/graphics/viewers Compiled version of ghostscript for Linuxftp://ftp.wuarchive.edu/ Numerous code fragments for image formats are scattered throughout this large archivecompuserve.com GRAPHSUPPORT forum, library 20, LP071.zip, the beta version of the PNG toolboxwww.uwm.edu/~ggraef. List of links and other direct links to format information
- Readers' Choice Awards 2013
- Linux Kernel News - November 2013
- December 2013 Issue of Linux Journal: Readers' Choice
- Mars Needs Women
- Sublime Text: One Editor to Rule Them All?
- Raspberry Pi: the Perfect Home Server
- RSS Feeds
- Advanced Hard Drive Caching Techniques
- Web Administration Scripts
- IBM Will Minimize Impact of Future Disasters
- thanks for share, great
13 hours 44 min ago
- There are factors which are
18 hours 44 min ago
- Gnome 3 ?
19 hours 29 min ago
- Reply to comment | Linux Journal
23 hours 36 min ago
- "Redis RethinkDB 4.5%" on Best NoSQL Databases
1 day 9 hours ago
- on the ground
1 day 16 hours ago
- I was able to read the whole
1 day 17 hours ago
- since i have read the title i
1 day 20 hours ago
- Belanja Online Cari Voucher Diskon
1 day 20 hours ago
- The kernel doesn't really
2 days 9 hours ago