Image Files Formats

3,334 views

Published on

Image Files Formats

  1. 1. Image Files Size is not everything
  2. 2. File Formats <ul><li>the three most common graphic file formats, </li></ul><ul><li>the most important for general purposes today, are TIF, JPG and GIF.   </li></ul><ul><li>also consider the new PNG format too </li></ul>
  3. 3. <ul><li>First, the type of image you are working with may lend itself to one format over another. </li></ul><ul><li>Then, determine which file format will be compatible with the application software you intend to use. </li></ul><ul><li>Then, consider your need for cross-platform compatibility. Finally, each format offers varying degrees of compression, which can impact image quality. </li></ul><ul><li>There are two types of data compression: lossless and lossy. Lossless achieves about a 2:1 compression ratio, but the reconstructed image is mathematically and visually identical to the original. </li></ul><ul><li>Lossy compression provides much higher compression rates and the loss of data can be visible to the eye. </li></ul>
  4. 4. Photographic images Graphics, Logos, Line art and Screen Captures Properties Continuous tones, 24 bit color or 8 bit Gray, no text, few lines and edges Solid colors, up to 256 colors, with text or lines and sharp edges Best Quality for Master Copy TIF or PNG PNG or GIF or TIF Smallest File Size JPG,   75% to 80% Quality factor is good. Normal useful range is 90% to 60% (JPG is not suitable for master copy) PNG or GIF, maybe TIF LZW. Graphics/logos usually permit 2 to 16 colors for smallest file Maximum Compatibility (PC, Mac, Unix) TIF without LZW TIF without LZW Poor Choice 256 color GIF is limited color, and is a larger file than 24 bit JPG JPG compression adds artifacts, smears text and lines and edges
  5. 5. File size <ul><li>Here are some file sizes for a 9.9 megabyte 1943x1702 color image: </li></ul><ul><li>File type File size </li></ul><ul><li>TIFF 9.9 megs </li></ul><ul><li>TIFF LZW 8.4 megs </li></ul><ul><li>PNG 6.5 megs </li></ul><ul><li>JPG 75% 0.5 megs </li></ul><ul><li>BMP 9.9 megs </li></ul><ul><li>PCX 9.2 megs </li></ul><ul><li>TGA 9.8 megs </li></ul>
  6. 6. The TIFF File <ul><li>TIFF -- or Tag Image File Format -- was developed by Aldus Corporation in 1986, specifically for scanners, frame grabbers, and paint/photo-retouching programs. </li></ul><ul><li>it is the most versatile, reliable, and widely supported bit-mapped format. </li></ul><ul><li>It is capable of describing bilevel, grayscale, palette-color, and full-color image data in several color spaces. </li></ul><ul><li>It includes a number of compression schemes and is not tied to specific scanners, printers, or computer display hardware. </li></ul><ul><li>The TIFF format does have several variations, </li></ul><ul><li>occasionally an application may have trouble opening a TIFF file created by another application or on a different platform. </li></ul>                       
  7. 7. TIFF <ul><li>TIFF writes a large file, </li></ul><ul><li>and it uses lossless compression, </li></ul><ul><li>there are no losses, </li></ul><ul><li>you can always read back in what you wrote out, without data corruption. </li></ul><ul><li>If you might ever be modifying and writing the file a second time, then use a non-lossy format like TIFF. </li></ul><ul><li>TIF files are large, huge even, </li></ul>
  8. 8. PICT File <ul><li>The PICT format is native to the Macintosh. </li></ul><ul><li>It first appeared in 1984 with the introduction of MacDraw software. </li></ul><ul><li>it has been used by many applications, especially when images are designed for screen previews. </li></ul><ul><li>It is great for presentations, screen displays, and video work. </li></ul><ul><li>The PICT format can contain both bit-mapped and object-oriented graphics. </li></ul><ul><li>It is a standard format for graphics that are cut or copied to the Clipboard and for drawings that will be output on raster printers. </li></ul>       
  9. 9. The EPS File <ul><li>EPS -- or Encapsulated PostScript -- files are the standard format for storing high-resolution PostScript illustrations. </li></ul><ul><li>The EPS format -- which was introduced in the mid-’80s allows both Mac and Windows users to save bit-mapped screen representations of screen images. These previews, however, don’t travel well across platforms. </li></ul><ul><li>An EPS file generally has two parts: a PostScript (text) description that tells a PostScript printer how to output the resolution-independent image, and (optionally) a bit-mapped PICT image for on-screen previews. </li></ul><ul><li>A drawing saved in EPS format can be imported into other documents and scaled and cropped, </li></ul><ul><ul><li>BUT its contents are often no longer editable, even by the program that created it (Adobe Illustrator files are the exception). </li></ul></ul>                     
  10. 10. The GIF File <ul><li> GIF -- or Graphics Interchange Format -- files define a protocol intended for the on-line transmission and interchange of raster graphic data in a way that is independent of the hardware used in their creation or display. </li></ul><ul><li>The GIF format was developed in 1987 by CompuServe </li></ul><ul><li>for compressing eight-bit images that could be telecommunicated through their service and exchanged among users. </li></ul><ul><li>The GIF file is defined in terms of blocks and sub-blocks which contain relevant parameters and data used in the reproduction of a graphic. </li></ul><ul><li>A GIF data stream is a sequence of protocol blocks and sub-blocks representing a collection of graphics. </li></ul>                  
  11. 11. gif <ul><li>GIF is limited to only 256 colors, a great match for the older 8 bit video boards, </li></ul><ul><li>poorly suited today for photographic purposes. </li></ul><ul><li>The file is also large for photographic images. </li></ul>
  12. 12. <ul><li>GIF is still the smallest file for 16 or 256 color data like graphic art or screen captures or 2 color Line art, format of choice </li></ul><ul><li>. Simple images like a company logo should be reduced to 16 colors if possible and saved as a GIF for smallest size on the web. </li></ul><ul><li>Some image programs will convert to any number of colors, and a complex logo might look bad at 16 colors, but look very good at say 43 colors. </li></ul><ul><li>The fewer colors, the smaller the GIF file. Size is important to web pages. </li></ul><ul><li>GIF uses lossless compression, like TIF. </li></ul>
  13. 13. <ul><li>JPG is much better for photographic images, the file is very much smaller (although lossy). </li></ul><ul><li>But GIF files will be smaller for graphic artwork. </li></ul><ul><li>GIF also optionally offers transparent backgrounds. </li></ul><ul><li>When you select GIF format, your FILE - SAVE AS dialog box has an Option Button. </li></ul><ul><li>Under that Option button is an option for transparency, to specify which one GIF palette index is to be transparent. </li></ul><ul><li>Also, you will not even be offered the GIF format as a choice until you have reduced the image to 256 colors or less . </li></ul>
  14. 14. <ul><li>The 256 colors in a GIF image can be any 256 colors from the set of 16.7 million colors. </li></ul><ul><li>Each color is a 24 bit RGB value, and each GIF file contains its own color palette. </li></ul><ul><li>The actual image data contains the 8 bit index to this color in the palette, and each pixel in the images specifies one of the palette colors, maybe &quot;color number 82&quot;. </li></ul><ul><li>If a 8-bit 256 color video mode is used, then Windows reloads its Palette Manager to the palette in the image so that it can map the color correctly. </li></ul><ul><li>This of course disrupts the palette of all other 8 bit images simultaneously on your screen, and you may see some flashes and bizarre colors. </li></ul><ul><li>For that reason (8 bit video mode), all the GIF files in one HTML document should use the same color palette. </li></ul>
  15. 15. The JPEG File <ul><li>JPEG is a standardized image compression mechanism. </li></ul><ul><li>The name derives from the Joint Photographic Experts Group, </li></ul><ul><li>JPEG is not a file format, but rather a method of data encoding used to reduce the size of a data file. </li></ul><ul><li>It is most commonly used within file formats such as JFIF and TIFF. </li></ul><ul><li>JPEG File Interchange Format (JFIF) is a minimal file format which enables JPEG bitstreams to be exchanged between a wide variety of platforms and applications. </li></ul><ul><li>This minimal format does not include any of the advanced features found in the TIFF JPEG specification or any application specific file format. </li></ul>                           
  16. 16. The JPEG File <ul><li>JPEG is designed for compressing either full-color or grayscale images of natural, real-world scenes. </li></ul><ul><li>It works well on photographs, naturalistic artwork, and similar material, but not so well on lettering or simple line art. </li></ul><ul><li>It is also commonly used for on-line display/transmission; such as on web sites. </li></ul><ul><li>A 24-bit image saved in JPEG format can be reduced to about one-twentieth of its original size. </li></ul>                           
  17. 17. <ul><li>JPG uses a lossy compression, </li></ul><ul><li>some quality is lost when the file is written (saved), and it cannot be recovered. </li></ul><ul><li>Even worse, a little more quality is lost EVERY TIME the JPG file is compressed and saved again. </li></ul>
  18. 18.               90% Quality JPG - 1352 bytes              70% Quality JPG - 1074 bytes              50% Quality JPG - 966 bytes              30% Quality JPG - 893 bytes              256 color GIF - Optimized palette - 2932 bytes              256 color GIF - Standard 6-6-6 palette - 1524 bytes              16 color GIF - Optimized palette - 888 bytes
  19. 19. <ul><li>JPG is mathematically complex, </li></ul><ul><li>very similar in process to digitizing sound, </li></ul><ul><li>requires considerable CPU processing power to decompress an image. </li></ul><ul><li>A 486/33 will slow noticeably loading a large JPG. </li></ul>
  20. 20. <ul><li>If you find that you must edit the JPG image and save a JPG again, </li></ul><ul><li>use the SAME value of Quality or Compression EVERY time you save the file. </li></ul><ul><li>Using different values will use different parameters which will aggravate the damage due the lossy compression. </li></ul><ul><li>Using the same value is sometimes not all that terribly bad. </li></ul><ul><li>multiple writing of JPG files is a BAD thing, </li></ul><ul><li>but there are even worse ways to do it. </li></ul>
  21. 21. The Photoshop File <ul><li>A Photoshop file is the native file format for Adobe Photoshop. </li></ul><ul><li>A file saved in this manner can only be opened and edited in Photoshop. </li></ul><ul><li>However, the user has the option to save the file in a variety of other formats that are readable in both the Macintosh and PC environment. </li></ul>                                                    
  22. 22. The Photoshop File <ul><li>The major advantage of the Photoshop format becomes apparent when working on documents with layers. </li></ul><ul><li>For example, a background can be created on one layer, then graphics can be added on a second layer, a drop-shadow on a third layer and text on yet another layer. </li></ul><ul><li>Each layer is independent of the others and can be edited separately without affecting the contents of the other layers. </li></ul><ul><li>Photoshop supports the preservation of layer information, so that the layers can be preserved for additional editing. </li></ul>                                                    
  23. 23. The IVUE File <ul><li>The IVUE file is a format developed by Live Picture, Inc. to work with its FITS (Functional Interpolating Transformation System) technology. </li></ul><ul><li>Image editing actions are stored mathematically in a FITS file, while the original pixel data is saved in the IVUE format. A </li></ul><ul><li>new output file is created from the original IVUE image based on the FITS file in a single, final RIP process that avoids cumulative processing error. </li></ul><ul><li>The major advantage of the format is its ability to deal only with that portion of an image being edited, thereby greatly speeding screen display between edits. </li></ul>
  24. 24. BMP <ul><li>BMP (Windows Bitmap) BMP is lossless like TIF and PNG. </li></ul><ul><li>BMP will handle 24 bit data but it cannot be compressed. </li></ul><ul><li>BMP uses RLE (Run Length Encoding) to compress 8 bit data, </li></ul><ul><li>Effective in graphics, but much less effective in continuous tones like photos. </li></ul>
  25. 25. PCX <ul><li>PCX (Windows PaintBrush) PCX is lossless like TIF and PNG. </li></ul>
  26. 26. File Formats <ul><li>There is nothing wrong with using BMP and PCX files other than they are not universally used except in Windows, and the amount of compression is rather low. </li></ul><ul><li>These formats are not suitable for exchange with Macintosh users for example, who may not be able to read them. </li></ul>
  27. 27. PICT <ul><li>PICT (Macintosh Quickdraw) PICT is used in page layout and graphics programs, </li></ul><ul><li>lossless like TIF and PNG. </li></ul><ul><li>PICT is not suitable for exchange with Windows programs. </li></ul>
  28. 28. Encyclopedia of Graphics File Formats , <ul><ul><li>File formats for Popular PC Software: A Programmer’s Reference , Jeff Walden (John Wiley & Sons, Inc. 1986) </li></ul></ul><ul><ul><li>File Format Handbook , Allen G. Taylor (Microtrend Books 1992) </li></ul></ul><ul><ul><li>The File Format Handbook , Guenter Born (International Thomson Computer Press 1995) </li></ul></ul><ul><ul><li>Graphics File Formats , David C. Kay and John R. Levine(Windcrest Books/McGraw-Hill 1995) </li></ul></ul><ul><ul><li>Graphics File Formats: Reference and Guide , C. Wayne Brown and Barry J. Shepherd (Manning Publications 1994) </li></ul></ul><ul><ul><li>The Graphic File Toolkit: Converting and Using Graphic Files , Steve Rimmer (Addison-Wesley 1994) </li></ul></ul><ul><ul><li>High Resolution Graphics Display Systems , Jon Peddie (Windcrest Books/McGraw-Hill 1994) </li></ul></ul><ul><ul><li>Inside Windows File Formats , Tom Swan (Sams Publishing 1993) </li></ul></ul><ul><ul><li>Internet File Formats , Tim Kientzle (The Coriolis Group 1995) </li></ul></ul><ul><ul><li>PC File Formats & Conversions , Ralf Kussmann (Abacus 1990) </li></ul></ul>
  29. 29. Saving

×