14
Digital Image Digital Image Formats: Formats: An Explanation An Explanation Guilford County SciVis Guilford County SciVis V106.01 V106.01

Digital Image Formats: An Explanation Guilford County SciVis V106.01

Embed Size (px)

Citation preview

Page 1: Digital Image Formats: An Explanation Guilford County SciVis V106.01

Digital Image Digital Image Formats:Formats:

An ExplanationAn ExplanationGuilford County SciVisGuilford County SciVis

V106.01V106.01

Page 2: Digital Image Formats: An Explanation Guilford County SciVis V106.01

An explanationAn explanation Why so many file Why so many file

formats?formats? How are they used?How are they used? One reason is One reason is

compression, lossy or compression, lossy or lossless.lossless.

Another reason is the Another reason is the number of colors to be number of colors to be used.used.

Page 3: Digital Image Formats: An Explanation Guilford County SciVis V106.01

Lossy vs. lossless compressionLossy vs. lossless compression Lossy compression Lossy compression

loses some part of the loses some part of the file.file.

Lossless compression Lossless compression does not lose any part of does not lose any part of the compressed file.the compressed file. LZW is an example of a LZW is an example of a

lossless compression lossless compression algorithm.algorithm.

Lossy compression will be missing part of the file to save space.

Page 4: Digital Image Formats: An Explanation Guilford County SciVis V106.01

Number of colorsNumber of colors Images have differing numbers Images have differing numbers

of color within them.of color within them. Black and white images take Black and white images take

up the least amount of space up the least amount of space with 1 bit of information.with 1 bit of information.

Current video cards are able to Current video cards are able to display 24 bits of color per display 24 bits of color per pixel.pixel.

This makes it possible for 16 This makes it possible for 16 million colors to be displayed million colors to be displayed (2(22424 colors). colors).

This requires a significant This requires a significant amount of disk space.amount of disk space.

Page 5: Digital Image Formats: An Explanation Guilford County SciVis V106.01

The file types - TIFFThe file types - TIFF TIFF can be lossless or lossy. TIFF can be lossless or lossy. The details of the image storage algorithm are The details of the image storage algorithm are

included as part of the file. included as part of the file. TIFF is used almost exclusively as a lossless image TIFF is used almost exclusively as a lossless image

storage format that uses no compression at all. storage format that uses no compression at all. Most graphics programs that use TIFF do not use Most graphics programs that use TIFF do not use

compression . compression . File sizes are quite big. File sizes are quite big.

(Sometimes LZW is used, but it is not universally (Sometimes LZW is used, but it is not universally supported.)supported.)

Page 6: Digital Image Formats: An Explanation Guilford County SciVis V106.01

The file types - PNGThe file types - PNG PNG is a lossless storage format. PNG is a lossless storage format. It looks for patterns in the image that it can use It looks for patterns in the image that it can use

to compress file size. to compress file size. The compression is exactly reversible, so the The compression is exactly reversible, so the

image is recovered exactly. image is recovered exactly.

Page 7: Digital Image Formats: An Explanation Guilford County SciVis V106.01

The file types - GIFThe file types - GIF GIF creates a table of up to 256 colors from a GIF creates a table of up to 256 colors from a

pool of 16 million. pool of 16 million. If the image has fewer than 256 colors, GIF If the image has fewer than 256 colors, GIF

can render the image exactly. can render the image exactly. GIF is "lossless" only for images with 256 GIF is "lossless" only for images with 256

colors or less. For a rich, true color image, GIF colors or less. For a rich, true color image, GIF may "lose" 99.998% of the colors.may "lose" 99.998% of the colors.

Page 8: Digital Image Formats: An Explanation Guilford County SciVis V106.01

The file types - JPGThe file types - JPG JPG JPG is optimized for photographs and similar is optimized for photographs and similar

continuous tone images that contain many, continuous tone images that contain many, many colors. many colors.

It can achieve astounding compression ratios It can achieve astounding compression ratios even while maintaining very high image quality. even while maintaining very high image quality.

It stores information as 24 bit color. It stores information as 24 bit color. The degree of compression of a JPG is The degree of compression of a JPG is

adjustable. adjustable.

Page 9: Digital Image Formats: An Explanation Guilford County SciVis V106.01

The file types - BMPThe file types - BMP BMP BMP is an uncompressed proprietary format is an uncompressed proprietary format

invented by Microsoft. invented by Microsoft. There is really no reason to ever use this There is really no reason to ever use this

format.format.

Page 10: Digital Image Formats: An Explanation Guilford County SciVis V106.01

The file types - PSDThe file types - PSD PSD is a proprietary format used by Photoshop. PSD is a proprietary format used by Photoshop. This is the preferred working format to edit images in This is the preferred working format to edit images in

the softwarethe software This package uses layers to build complex images, This package uses layers to build complex images,

and layer information may be lost in the and layer information may be lost in the nonproprietary formats such as TIFF and JPG. nonproprietary formats such as TIFF and JPG.

However, it is best to save the product as a TIFF or However, it is best to save the product as a TIFF or JPG, so it can be viewed in the future when software JPG, so it can be viewed in the future when software changes. changes.

Page 11: Digital Image Formats: An Explanation Guilford County SciVis V106.01

The file types - SummaryThe file types - Summary TIFF files are generally large.TIFF files are generally large. PNG compression can be reversed if needed.PNG compression can be reversed if needed. GIF results in lose of color information.GIF results in lose of color information. JPG are the best in terms of compressed files.JPG are the best in terms of compressed files. BMP should be rarely, if ever used.BMP should be rarely, if ever used. PSD is exclusive to Photoshop. PSD is exclusive to Photoshop.

Page 12: Digital Image Formats: An Explanation Guilford County SciVis V106.01

TIFF (901 kb) TIFF (901 kb) http://http://www.wfu.edu/~matthews/misc/graphics/formats/uncwww.wfu.edu/~matthews/misc/graphics/formats/uncompr.tifompr.tif

JPG (301 kb) JPG (301 kb) http://http://www.wfu.edu/~matthews/misc/graphics/formats/HiQwww.wfu.edu/~matthews/misc/graphics/formats/HiQ.jpg.jpg

PNG (741 kb) PNG (741 kb) http://http://www.wfu.edu/~matthews/misc/graphics/formats/png.www.wfu.edu/~matthews/misc/graphics/formats/png.pngpng

GIF (131 kb) GIF (131 kb) http://http://www.wfu.edu/~matthews/misc/graphics/formats/optwww.wfu.edu/~matthews/misc/graphics/formats/optmedcut.gifmedcut.gif

File size comparisonsFile size comparisons

Page 13: Digital Image Formats: An Explanation Guilford County SciVis V106.01

TIFF – This is usually the best quality output from a TIFF – This is usually the best quality output from a digital camera. digital camera.

JPG – This is the format of choice for nearly all JPG – This is the format of choice for nearly all photographs on the web. photographs on the web.

GIF - For images with fewer than 256 colors and large GIF - For images with fewer than 256 colors and large areas of uniform color like cartoons.areas of uniform color like cartoons. Do NOT use GIF for photographic images Do NOT use GIF for photographic images

PNG - For images with large areas of exactly uniform PNG - For images with large areas of exactly uniform color, but more than 256 colors color, but more than 256 colors Also, for display of photographs Also, for display of photographs exactlyexactly without loss of quality without loss of quality

on the web. on the web.

When should you choose each?When should you choose each?

Page 14: Digital Image Formats: An Explanation Guilford County SciVis V106.01

ReferenceReference Matthews, R. (2007). Matthews, R. (2007). Digital image file typesDigital image file types. .

Retrieved June 21, 2007 from Retrieved June 21, 2007 from http://www.wfu.edu/~matthews/misc/graphics/http://www.wfu.edu/~matthews/misc/graphics/formats/formats.html.formats/formats.html.