SLAS

Digital imaging/Image files

From LabAutopedia

Jump to: navigation, search

Digital image file formats are standardized means of organizing and storing images. Image files are composed of either pixel or vector (geometric) data that are rasterized to pixels when displayed. The pixels that compose an image are ordered as a grid (columns and rows); each pixel consists of numbers representing magnitudes of brightness and colour.  There are five main types of image files; JPG, GIF, TIFF, PNG, BMP, plus many others.  Part of the reason for the plethora of file types is the need for compression.  Image files can be quite large, and larger file types mean more disk usage and slower downloads. Compression is a term used to describe ways of cutting the size of the file.  Another reason for the many file types is that images differ in the number of colors they contain. If an image has few colors, a file type can be designed to exploit this as a way of reducing file size.

Contents

Image file compression

Compression types will be referred to as either "lossy" and "lossless". A lossless compression algorithm discards no information. It looks for more efficient ways to represent an image, while making no compromises in accuracy, but will generally result in a larger file size. In contrast, lossy algorithms accept some degradation in the image in order to achieve smaller file size.  When image quality is valued above file size, lossless algorithms are typically chosen.  A lossless algorithm might, for example, look for a recurring pattern in the file, and replace each occurrence with a short abbreviation, thereby cutting the file size. In contrast, a lossy algorithm might store color information at a lower resolution than the image itself, since the eye is not so sensitive to changes in color of a small distance.  Most lossy compression algorithms allow for variable quality levels (compression) and as these levels are increased, file size is reduced. At the highest compression levels, image deterioration becomes noticeable as "compression artifacting".  Lossy compression formats suffer from generation loss: repeatedly compressing and decompressing the file will cause it to progressively lose quality. This is in contrast with lossless data compression.

Images start with differing numbers of colors in them. The simplest images may contain only two colors, such as black and white, and will need only 1 bit to represent each pixel. Many early PC video cards would support only 16 fixed colors. Later cards would display 256 simultaneously, any of which could be chosen from a pool of 224, or 16 million colors. New cards devote 24 bits to each pixel, and are therefore capable of displaying 224, or 16 million colors without restriction. A few display even more. Since the eye has trouble distinguishing between similar colors, 24 bit or 16 million colors is often called TrueColor.

Image file types

These formats store images as bitmaps (also known as pixmaps).

JPEG

JPEG (Joint Photographic Experts Group) files are (in most cases) a lossy format; the DOS filename extension is JPG (other OS might use JPEG). Nearly every digital camera can save images in the JPEG format, which supports 8 bits per color (red, green, blue) for a 24-bit total, producing relatively small files. The degree of file compression is adjustable.  When not overly compressed the compression does not noticeably detract from the image's quality, but JPEG files suffer generational degradation when repeatedly edited and saved.  Photographic images may be better stored in a lossless non-JPEG format if they will be re-edited, or if small "artifacts" (blemishes caused by the JPEG's compression algorithm) are unacceptable. The JPEG format also is used as the image compression algorithm in many Adobe PDF files.

JPEG image compression examples
Image:JPEG_example_JPG_RIP_100.jpg Image:JPEG_example_JPG_RIP_025.jpg Image:JPEG_example_JPG_RIP_001.jpg
Full quality (Q = 100) 83,261 bytes Medium quality (Q = 25) 9,553 Lowest quality (Q = 1) 1,523

 

TIFF

The TIFF (Tagged Image File Format) is a flexible format that normally saves 8 bits or 16 bits per color (red, green, blue) for 24-bit and 48-bit totals, respectively, using either the TIFF or the TIF filenames. TIFFs are lossy and lossless; some offer relatively good lossless compression for bi-level (black&white) images; lossless TIFFs tend to be large files. Some digital cameras can save in TIFF format, using the LZW compression algorithm for lossless storage. The TIFF image format is not widely supported by web browsers. TIFF remains widely accepted as a photograph file standard in the printing business. The TIFF can handle device-specific colour spaces.

RAW

RAW refers to a family of raw image formats that are options available on some digital cameras. These formats usually use a lossless or nearly-lossless compression, and produce file sizes much smaller than the TIFF formats of full-size processed images from the same cameras. The raw formats are not standardized or documented, and differ among camera manufacturers. Many graphic programs and image editors may not accept some or all of them, and some older ones have been effectively orphaned already. Adobe's Digital Negative specification is an attempt at standardizing a raw image format to be used by cameras, or for archival storage of image data converted from proprietary raw image formats.

PNG

The PNG (Portable Network Graphics) file format was created as the free, open-source successor to the GIF. The PNG file format supports truecolor (16 million colours) while the GIF supports only 256 colours. The PNG file excels when the image has large, uniformly coloured areas.  The PNG algorithm looks for patterns in the image that it can use to compress file size. The compression is exactly reversible, so the image is recovered exactly.  The lossless PNG format is best suited for editing pictures, and the lossy formats, like JPG, are best for the final distribution of photographic images, because JPG files are smaller than PNG files. Many older browsers currently do not support the PNG file format, however, with Internet Explorer 7, all contemporary web browsers fully support the PNG format.

GIF

GIF (Graphics Interchange Format) is limited to an 8-bit palette, or 256 colors. This makes the GIF format suitable for storing graphics with relatively few colors such as simple diagrams, shapes, logos and cartoon style images. The GIF format supports animation and is still widely used to provide image animation effects. It also uses a lossless compression that is more effective when large areas have a single color, and ineffective for detailed images or dithered images.  GIF achieves compression in two ways. First, it reduces the number of colors of color-rich images, thereby reducing the number of bits needed per pixel, as just described. Second, it replaces commonly occurring patterns (especially large areas of uniform color) with a short abbreviation: instead of storing "white, white, white, white, white," it stores "5 white."

BMP

The BMP file format (Windows bitmap) handles graphics files within the Microsoft Windows OS. Typically, BMP files are uncompressed, hence they are large; the advantage is their simplicity, wide acceptance, and use in Windows programs.


Click [+] for other articles on 
Digital imaging(1 C, 8 P)
The Market Place for Lab Automation & Screening  Imaging Systems Imaging Software