260 likes | 407 Views
Image File Types. What makes the differences…. Image File Types. The most important file types when saving images, are jpeg (or jpg), tif and gif . Each has advantages and disadvantages Each has an algorithm used to compress file size, which affects the image integrity.
E N D
Image File Types What makes the differences…
Image File Types • The most important file types when saving images, are jpeg (or jpg), tif and gif. • Each has advantages and disadvantages • Each has an algorithm used to compress file size, which affects the image integrity. • File size determines quality of image and uses
Compression Algorithms Example: A picture is converted to a digital file by compression that sees it as an array of dots of specific color and brightness for each dot. If the picture contains an area of the same color, it can be compressed without loss by saying "200 red dots" instead of "red dot, red dot, ...(197 more times)..., red dot."
Compression Algorithms Digital data can be compressed using algorithms that reduce file sizes: : • needed to store it • the bandwidth needed to stream it • no loss of information in the original file Two major algorithms – Lossy and Lossless • Using lossy compression to make smaller sized files, there are some “down” sides to consider • One major cost is image quality.
Compression Algorithms Files or data streams often contain more than needed information for a particular purpose Developing lossy compression techniques to match human perception as closely as possible is a complex task. Sometimes the ideal is a file providing exactly the same perception as the original, with as much digital information as possible removed Other times, perceptible loss of quality is a valid trade-off for the reduced data size
Compression Algorithms For example, a picture may have more detail than the eye can distinguish when reproduced at the largest size intended Or, an audio file does not need a lot of fine detail during a very loud passage Looking at an example of this…
Compression Algorithms This photo of a cat has a compression rate decreasing from left to right.
Compression Algorithms Lossycompression techniques were made to closely match human perception for a complex task. Sometimes the ideal is a file that provides exactly the same perception as the original, with as much digital information as possible removed; other times, perceptible loss of quality is considered a valid trade off for reduced data. A photo of a cat with the compression rate decreasing from left to right. valid trade-off for the reduced data
JPEG – JPG Files • "JPEG" - acronym for the Joint Photographic Experts Group which created the standard. • Jpg file options are used when small file size is more important than maximum image quality; for example, Web pages, email, camera memory cards. Usually this file type is good enough, if comparison is not necessary.
JPEG - Compression • Lossy algorithms: common in digital photography • Lossycompression makes smaller sized files, “down” side to consider - cost in image quality • Degree of compression can be adjusted: allows a selectable tradeoff between storage size and image quality • JPEG typically achieves 10:1 compression with little perceptible loss in image quality
JPEG - Tips • Always choose a larger JPEG file size • Do Not edit and resave a JPG repeatedly • each time a JPG is edited and resaved it loses a little more of its quality • pixels begin to change colors, to colors they were not to begin with • these pixels are called “artifacts” (pixels that become colors they should not be in an image)
JPEG - Artifacts JPEG may not be right for line drawings and other textual or iconic graphics, where sharp contrasts between adjacent pixels can cause noticeable artifacts. These images may be better saved in a lossless graphics format (TIFF, GIF, PNG) format. (The JPEG standard actually includes a lossless coding mode, but that mode is not supported in most products.)
JPEG - Artifacts • Medium quality photo uses only 4.3% of storage space required for uncompressed images, with little loss of detail or visible artifacts being noticeable. • Once a certain threshold of compression is passed, compressed images show increasingly visible defects • A particular limitation of JPEG in this regard is its non-overlapped 8×8 block transform structure • More modern JPEG 2000 or JPEG XR exhibit more supple degradation of quality as bit usage decreases – • by using transforms with a larger spatial extent for the lower frequency coefficients • by using overlapping transform basis functions
JPEG - Artifacts • Medium quality photo uses only 4.3% of storage space required for uncompressed images, with little loss of detail or visible artifacts being noticeable. • Once a certain threshold of compression is passed, compressed images show increasingly visible defects • A particular limitation of JPEG in this regard is its non-overlapped 8×8 block transform structure • More modern JPEG 2000 or JPEG XR exhibit more supple degradation of quality as bit usage decreases – • by using transforms with a larger spatial extent for the lower frequency coefficients • by using overlapping transform basis functions
GIF Files • “GIF" - originally designed for video use at “dial-up modem” speeds by CompuServe • Limited for 24-bit color photos • GIF is very good (maybe best) for Web graphics (i.e. using a limited amount of colors), but should not be used for color photos
GIF - Compression • Lossless compression algorithm, but is always Indexed (using a maximum256 colors) • For graphics of only 8 to 16 colors, GIFS can be a smaller file size than JPG, with more clear pure color.
JPG vs. GIF The GIF file is 18 times larger in file size than the JPG file, but the JPG still looks better. See the purple pixels that the GIF mixes in the face to try to get the correct average color in this region.
TIF Files • TIF can be used for about anything using 1 bit to 48 bit color, RGB, CMYK, and/or Indexed color. • Most “special” file types (like RAW camera file types) are TTG, using unique proprietary data tags, • They are incompatible without special software
TIF – Compression • Lossy algorithm: supporting the highest quality format for commercial work • Not actually “high quality” per se - just does not suffer from the JPG artifact problem, detracting from an image • TIF images should not be used for Web pages; they are too large for easily transferring to browsers for displays; JPG, GIF and PNG images are far better for this reason.
TIF Files • TIFF (which stands for Tagged Image File Format) is considered the standard photographic file format, because it is a highly flexible format that uses a lossless compression algorithm, so there’s no image degradation during compression. • TIFF files may be edited and re-saved without losing any image quality (unlike JPEG files) • When using third party image processor software (like Adobe’s Photoshop), access to individual layers of an edited and saved image is retained, so they can be revisited in the future.
PNG Files • The PNG format was developed as a replacement for the GIF format when it appeared GIF images would be subject to a royalty fee. • PNG graphics have a better compression rate than GIF images, resulting in smaller file sizes than the same file saved as a GIF • PNG files offer alpha transparency as well as animation. • BUT - PNG images, like GIFs, are not well suited to photographs • It is possible to get around the banding issue that affects photographs saved as GIF files using true colors, but this can result in very large images
BITMAP Files • A bitmap corresponds bit-for-bit with an image displayed on a screen, generally in the same format used for storage in the display's video memory, or maybe as a device-independent bitmap. • A bitmap is technically characterized by the width and height of the image in pixels and by the number of bits per pixel (a color depth, which determines the number of colors it can represent).
BITMAP Files • A bitmap is technically characterized by the width and height of the image in pixels and by the number of bits per pixel (a color depth, which determines the number of colors it can represent). • Raster-based (bitmap) images are composed of millions of pixels • A raster image displays each individual pixel • Bitmap images have very large file sizes, due to this pixel storage and display method • Because of their file size, they are not used in Web sites.