9.5 GRAPHIC FILE FORMATS
 
 
 
 
 
Learn To DrawLearn To Draw Learn To PaintLearn To Paint Photoshop TipsPhotoshop Elements Animation MenuAnimation Menu Art MenuArt Principles Art AppreciationArt Appreciation

Digital photographs are stored as bitmaps—a series of individually addressable pixels. Over the years, a number of different bitmap image formats have been developed. Each has it's own unique characteristics which determine when and where you might choose it over the others. However, whatever format you choose, there are programs that will convert it to any of the other formats.

Bit-mapped vs Vector Images

All of the still images that you see on the Web, or in multimedia programs, and many that you see in print, have been created or manipulated on a computer in a digital format. There are two basic forms of computer graphics: bit-maps and vector graphics. The kind you use determines the tools you choose. Bitmap formats are the ones used for digital photographs. Vector formats are used only for line drawings.

Bit-mapped images

Bit-map images are formed from pixels—a matrix of dots with different colors. Bitmap images are defined by their dimension in pixels as well as by the number of colors they represent. For example, a 640X480 image contains 640 pixels and 480 pixels in horizontal and vertical direction respectively. If you enlarge a small area of a bit-mapped image, you can clearly see the pixels that are used to create it. When viewed normally, the small pixels merge into continuous tones much as the dots used to create newspaper photographs do. Each of the small pixels can be a shade of gray or a color. Using 24-bit color, each pixel can be set to any one of 16 million colors. All digital photographs and paintings are bitmapped, and any other kind of image can be saved or exported into a bitmap format. In fact, when you print any kind of image on a laser or ink-jet printer, it is first converted (rasterized) by either the computer or printer into a bitmap form so it can be printed with the dots the printer uses. To edit or modify these bitmapped images you use a paint program. Bitmap images are widely used but they suffer from a few unavoidable problems. They must be printed or displayed at a size determined by the number of pixels in the image. Printing or displaying one at any other size can create unwanted patterns in the image. Bitmap images also have large file sizes that are determined by the image’s dimensions in pixels and its color depth. To reduce this problem, some graphic formats such as GIF and JPEG are used to store images in compressed format.

Vector graphics

Vector graphics are really just a list of graphical objects such as lines, rectangles, ellipses, arcs, or curves—called primitives. Draw programs, also called vector graphics programs, are used to create and edit these vector graphics. These programs store the primitives as a set of numerical coordinates and mathematical formulas that specify their shape and position in the image. This format is widely used by computer-aided design programs to create detailed engineering and design drawings. It has also become popular in multimedia when 3D animation is desired. Draw programs have a number of advantages over paint-type programs. These include:

When working with a draw program, you can display the image in two views: wire frame view or shaded. In wire frame view, you see just the underlying lines—a skeletal view of the image. The image is displayed this way because it can be manipulated on the screen a lot faster. To see what the finished model looks like, you can apply colors to the wire frame and display it with the wire frame covered by these shaded surfaces.

vector.gif (5847 bytes)
The camera is shown in shaded view (left) and wireframe view (right). The ability to shift between these two views is characteristic of vector (draw) programs.

Native and Transfer Image Formats

Since bit-mapped images are the ones that most concern photographers, those are the ones we'll concentrate on in this section. Bitmap file formats fall into two subclasses; native and transfer or exchange formats.

Native Formats

As new programs are introduced, developers have a tendency to create proprietary, or native formats that can be read only by their programs. Part of this desire is to have a competitive advantage. But there is also a need sometimes to design a new format to accommodate new procedures or possibilities. However, native formats present serious problems for users who want to transfer image files among programs and share them with others. They are often not readable by other programs.

Transfer Formats

Because native formats are so limiting, transfer formats have been designed to allow images to be moved between application programs and even between operating systems. Some of these formats started out as native formats but were so widely adopted by others that they became transfer formats. Almost all graphics applications can open and save these transfer formats as well as their own native formats.

Popular Image Formats

Over the years, hundreds of image file formats have been created. However, most of these have fallen into disuse or are encountered only in special circumstances. As new demands arise, such as displaying images on the Web, new formats emerge. Some, such as Photo CD, gain wide acceptance. Others generate a lot of excitement and then disappear because they are found to have flaws. In this section we explore those formats you are most likely to use or encounter.

TIFF (.TIF)

TIFF (Tag Image File Format), pronounced "tiff," was originally developed by Aldus Corporation to save images created by scanners, frame grabbers, and photo editing programs. This format has been widely accepted and widely supported as an image transfer format not tied to specific scanners, printers, or computer display hardware. TIFF is also a popular format for desktop publishing applications. There are several variations of the format, called extensions, so you may have occasional problems opening one from another source. Some versions are compressed using the LZW or other lossless methods. TIFF files support up to 24-bit colors.

PICT (.PIC)

The PICT format, pronounced "pick," was introduced along with MacDraw software for the Macintosh. It has since become a Macintosh standard.

EPS (.EPS)

EPS (Encapsulated PostScript) files, pronounced a letter at a time "E-P-S," use a format developed by Adobe for PostScript printers. These files generally have two parts. The first is a text description that tells a PostScript printer how to output the image. The second is an optionally bit-mapped PICT image for on-screen previews. Once an image has been saved in the EPS format, you can import it into other programs and scale and crop it. However, its contents are often no longer editable except by a few programs such as Adobe Illustrator. For this reason, these files are generally created at the end of the process when they are about to be incorporated into a printed publication.

BMP (.BMP)

BMP, pronounced a letter at a time "B-M-P," files use a Windows bitmap format. These images are stored in a device-independent bitmap (DIB) format that allows Windows to display the bitmap on any type of display device. The term "device independent" means that the bitmap specifies pixel color in a form independent of the method used by a display to represent color. The default filename extension is .BMP and these files come in two formats:

Windows can store color data along with the image it affects. When stored like this, the images is called a Microsoft Device Independent Bitmap, or DIB. When written out to a file, it in the Microsoft Bitmap Format, or BMP. References to the DIB file format actually refer to BMP.

Windows RLE files are Windows DIB files that use RLE compression. Using RLE compressions to save an image as a DIB or BMP, produces an RLE file. The only difference is the filename extension.

JPEG (.JPG)

The JPEG (Joint Photographic Experts Group) format, pronounced "jay-peg," is by far the most popular format for display of photographic images on the Web. The term "JPEG" is often used to describe the JFIF file format (JPEG File Interchange Format). JFIF is the actual file format that contains an image compressed with the JPEG method. These newer JFIF files originally used the JPG extension, however, the latest standard calls for using a JIF extension instead. The format is optimized for the display of photographs and doesn't work as well as GIF for type or line drawings (GIF is optimized for those). JPEG images have two distinctive features:

Compression is performed on blocks of pixels eight on a side. You can see these blocks when you use the highest levels of compression or greatly enlarge the image. JPEG is a two pass compression and de-compression algorithm. This means it take longer to load and display than a gif file. You can save images in a progressive JPEG format that works somewhat like an interlaced GIF. While a standard JPEG  loads from top to bottom, a progressive JPEG displays the entire image starting with the largest blocks. This allows the image to be displayed first in low-resolution and then filled in as more data arrives. When you save an image in this format, you can specify the number of progressive scans. Don't use JPEG to save original images you expect to modify later. Every time you open one of these files, and then save it again, the image is compressed. As you go through a series of saves, the image become more and more degraded. Be sure to save your originals is a loss-free format such as TIFF or BMP at maximum color depth. Also, when you save an image as a JPEG, the image on the screen won't reflect the compression unless you load the saved version.

piecap_small.gif (24320 bytes) When you take a photo with a digital camera, exposure information such as shutter speed and aperture is saved in a header to the image file. PIE is a file utility that extracts the camera information from the raw .jpg and renames the PIC000XX.JPG filename to a more computer friendly name keyed to the date and time as well as other photo information. There are basically two standards for picture information headers: Olympus/Sanyo/Casio-compatible and EXIF standard. Most of the new cameras are EXIF-compatible, but there are still camera specific information such as zoom values or quality modes. Courtesy of juworld.

PNG (.PNG)

PNG (Portable Network Graphics), pronounced "ping," has been developed to replace the aging GIF format and it is supported by both Microsoft Internet Explorer and Netscape Navigator. PNG, like GIF is a lossless format, but it has some features that the GIF format doesn't. These include 254 levels of transparency (GIF supports only one), more control over image brightness, and support for more than 48 bits per pixel. (GIF supports 8 for 256 colors). PNG also supports progressive rendering, as interlaced GIFs do, and tends to compress better than a GIF.

GIFs (.GIF)

GIF (Graphics Interchange Format) format images, pronounced "jiff," are widely used on the Web but mostly for line art, not for photographic images. This format stores up to 256 colors from an image in a table called a palette. Since images have millions of colors, a program such as PhotoShop selects the best ones to represent the whole when you save the image in this format. When displayed, each pixel in the image is then displayed as one of the colors from the table, much like painting by numbers.

There are two versions of GIF in use on the Web; the original GIF 87a and a newer GIF 89a. Both versions can use interlacing; storing images using four passes instead of one. Normally, when an image is displayed in a browser, it is transmitted a row at a time starting at the top row and filling in down the page. When saved as an interlaced GIF, it is first sent at its full size but with a very low resolution. This allows a person to get some idea of all of the contents of the image file before it is completely transmitted. As more pixels are sent in the next three passes the image fills in and eventually reaches its full resolution. The newer GIF 89a version adds some additional capabilities that include the following:

awiz.gif (3942 bytes) awiz5ani.gif (3942 bytes)
White background White background
made transparent.

GIF images are limited to a maximum of 256 colors. These colors, stored in a table, index, or palette, are often referred to as indexed colors. When you convert a photograph to GIF format, most graphics programs will allow you to dither it. This replaces lost colors with patterns of those available in the palette. Dithering improves the appearance of the image, but it also increases the size of the file. Although GIF photographs often look OK on-screen, they suffer if compared side-by-side with images saved in JPEG and other formats. The GIF format is best used for line art such as cartoons, graphs, schematics, logos, and text that have a limited number of colors and distinct boundaries between color regions. GIF images are compressed using a "lossless" form of compression called LZW (Lempel-Ziv-Welch). The amount of compression achieved depends on the frequency of color changes in each pixel row. This is because when two or more pixels in a row have the same color, they are recorded as a single block. Hence, a picture of horizontal stripes will compress more than one of vertical stripes, because the horizontal lines would be each stored as a single block. Photographs with large areas of identical colors such as skies, snow, clouds, and so on, will compress more than images with lots of colors and patterns.  To save a 24 bit image as a GIF, you must reduce the bit depth down to 8 bits. To reduce file sizes in GIF format, you can further reduce the number of colors in the image. This is difficult with most photographs, but not with line art. For example, if your image has 16 or fewer colors, you can convert it to a 4-bit (16-color) palette. Most graphics programs will allow you to do this. Even with photographs you can sometimes reduce the image to fewer colors than actually exist without noticeable loss. The discarded colors are those that are seldom-used or transitional colors between more frequent colors. When working with grayscale images, GIF works as well as JPEG because almost all programs use 8-bits (256 colors) for gray scale images.

Photo CD (.PCD)

Kodak's Photo CD is a Compact Disc (CD) containing image files designed to give you high quality at low cost. You can have your slides or negatives scanned onto these discs at your local photofinisher or any service bureau that offers this service. The quality you get is much higher than you would get from the most expensive digital cameras. Prices vary but range between $1 and $2 depending on the level of service. Once scanned onto the disc, the images can be displayed on a TV using a Photo CD player or copied into your computer from any CD drive that supports the Photo CD format (almost all now do). To help you find the image you want, the Photo CD comes with a set of index prints. These tiny prints allow you to quickly locate images and their files on the disc.

Photo_CDs.GIF (17930 bytes)
Here you see the relative sizes of the images stored on Photo CDs.

Photo CD images are stored in a file format called an Image Pac. An image pac actually contains thirteen individual files. These files include five different resolutions for the image (each one-quarter the size of the next largest). The files range in size from 72 kilobytes to 18 megabytes. The images are stored using the Photo YCC color encoding metric, developed by Kodak. Also included are other files used when you convert an image color from Kodak's YCC color encoding scheme to another color mode such as RGB (red, green ,blue) and CMYK (cyan, magenta, yellow, and black).

photocd.gif (10944 bytes) Kodak's PhotoCDs have become the optical storage medium of choice for many photographic applications. Courtesy of Kodak.

Photo CD disks come in a number of flavors, each designed for specific applications. Master disks come in two flavors—Photo CD Master discs and Pro Photo CD Master discs. Both can only store images that originated on film and were digitized using Kodak scanning systems and software.


BreBru.Com Extra Information Techonology HTML