Home Experiments Computer Science Fair Projects Computer Fair Books Computer Sciences Resources Computer & Internet Jokes Warning!
 
 


Image File Formats
K-12 Background Information
For Science Labs, Lesson Plans, Class Activities & Science Fair Projects
For Elementary, Middle and High School Students




 


Experiments Home
Computers
Graphics File Formats




Computer Science Fair Projects Home

  • Hardware
  • Software
  • Internet & Security
  • Robotics & (AI)
  • Graphics
  • Electronics

















  • Scientists and Inventors

    Scientists and Inventors
    Image File Formats

    Image file formats provide a standardized method of organizing and storing image data. This article deals with digital image formats used to store photographic and other image information. Image files are made up of either pixel or vector (geometric) data, which is rasterized to pixels in the display process, with a few exceptions in vector graphic display. The pixels that comprise an image are in the form of a grid of columns and rows. Each of the pixels in an image stores digital numbers representing brightness and color.

    Contents

    Image file sizes

    Image file sizes, expressed in bytes, increase with the number of pixels in the image, and the color depth of the pixels. The more rows and columns, the greater the image resolution and the greater the file size. Also, each pixel making up the image increases in size as color depth is increased. An 8-bit pixel (1 byte) can store 256 colors and a 24-bit pixel (3 bytes) can store 16 million colors. The latter is known as truecolor.

    Image compression is a method of using algorithms to decrease file size. High resolution cameras lead to large image files. Files sizes may range from hundreds of kilobytes to many megabytes depending on the cameras resolution and the format used to save the images. High resolution digital cameras record 8 megapixels (MP) (1MP= 1000000 pixels/ 1 million) images, or more, in truecolor. Consider an image taken by an 8 MP camera. Since each of the pixels uses 3 bytes to record true color, the uncompressed image would occupy 24,000,000 bytes of memory. That is a lot of storage space for just one image, and cameras must store many images to be practical. Faced with large file sizes, both within the camera, and later on disc, image file formats have been developed to address the storage problem. An overview of the major graphic file formats is given below.

    Image file compression

    There are two types of image file compression algorithms: lossy and lossless.

    Lossless compression

    Lossless compression algorithms reduce file size with no loss in image quality, though they usually do not compress to as small a file as a lossy method does. When image quality is valued above file size, lossless algorithms are typically chosen.

    Lossy compression

    Lossy compression algorithms take advantage of the inherent limitations of the human eye and discard information that cannot be seen. Most lossy compression algorithms allow for variable levels of quality (compression) and as these levels are increased, file size is reduced. At the highest compression levels, image deterioration becomes noticeable. This deterioration is known as compression artifacting.

    The images linked below demonstrate the noticeable artifacting associated with lossy compression algorithms. Click on the thumbnail image to view the full size version.

    Lossless Image Compression
    Lossless Image Compression
    Lossy Image Compression
    Lossy Image Compression


    NOTE: The two images above are designed to be illustrative only. Both were converted from a losslessly compressed RAW image in Adobe Photoshop 9.0. The "lossy" image was repeatedly opened and resaved using a low JPEG quality setting to increase visual artifacting and then exported as a PNG, while the "lossless" image was saved once as a PNG to minimize visual artifacting.

    Exif

    The Exif (Exchangeable image file) format is an algorithm incorporated in the JPEG software used in most cameras. Its purpose is to record and to standardize the exchange of data between digital cameras and editing and viewing software. The data are recorded for individual images and includes such things as: camera settings, time and date, shutter speed, exposure, image size, compression, name of camera, color information, etc. When images are viewed or edited by image editors, such as Paint Shop Pro, all of this image information can be displayed.

    Major graphic file formats

    There are many graphic file formats, if we include the proprietary types. The PNG, JPEG, and GIF formats are most often used to display images on the Internet. These graphic formats are listed and briefly described below, separated into the two main families of graphics: raster and vector.

    Raster formats

    These formats store images as bitmaps (also known as pixmaps). For a description of the technology aside from the format, see Raster graphics.

    JPEG

    The JPEG (Joint Photographic Experts Group) image files are a lossy format (in many cases). The DOS filename extension is JPG, although other operating systems may use JPEG. Nearly all digital cameras have the option to save images in JPEG format. The JPEG format supports 8-bit per color - red, green, and blue, for 24-bit total - and produces relatively small file sizes. Fortunately, the compression in most cases does not detract noticeably from the image. But JPEG files do suffer generational degradation when repeatedly edited and saved. Photographic images are best stored in a lossless non-JPEG format if they will be re-edited in future, or if the presence of small "artifacts" (blemishes), due to the nature of the JPEG compression algorithm (in most of the compressing tools), is unacceptable. JPEG is also used as the image compression algorithm in many Adobe PDF files.

    TIFF

    The TIFF (Tagged Image File Format) is a flexible image format that normally saves 16-bit per color - red, green and blue for a total of 48-bits - or 8-bit per color - red, green and blue for a total of 24-bits - and uses a filename extension of TIFF or TIF. TIFF's flexibility is both a feature and a curse, with no single reader capable of handling all the different varieties of TIFF files. TIFF can be lossy or lossless. Some types of TIFF offer relatively good lossless compression for bi-level (black and white, no grey) images. Some high-end digital cameras have the option to save images in the TIFF format, using the LZW compression algorithm for lossless storage. The TIFF image format is not widely supported by web browsers, and should not be used on the World Wide Web. TIFF is still widely accepted as a photograph file standard in the printing industry. TIFF is capable of handling device-specific color spaces, such as the CMYK defined by a particular set of printing press inks.

    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. Unfortunately, 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 one 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 is regarded, and was made as, the free and open-source successor to the GIF file format. The PNG file format supports true color (16 million colors) whereas the GIF file format only allows 256 colors. PNG excels when the image has large areas of uniform color. The lossless PNG format is best suited for editing pictures, and the lossy formats like JPG are best for final distribution of photographic-type images because of smaller file size. Many older browsers do not yet support the PNG file format, however with the release of Internet Explorer 7 all popular modern browsers fully support PNG. The Adam7-interlacing allows an early preview even when only a small percentage of the data of the image has been transmitted.

    GIF

    GIF (Graphic 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.

    BMP

    The BMP file format (Windows bitmap) is used internally in the Microsoft Windows operating system to handle graphics images. These files are typically not compressed, resulting in large files. The main advantage of BMP files is their wide acceptance, simplicity, and use in Windows programs.

    Vector formats

    See also: Encapsulated PostScript, PDF, SWF, Windows Metafile, AutoCAD DXF, and CorelDRAW CDR

    As opposed to the raster image formats above (where the data describes the characteristics of each individual pixel), vector image formats contain a geometric description which can be rendered smoothly at any desired display size.

    Vector file formats can contain bitmap data as well. 3D graphic file formats are technically vector formats with pixel data texture mapping on the surface of a vector virtual object, warped to match the angle of the viewing perspective.

    At some point, all vector graphics must be rasterized in order to be displayed on digital monitors. However vector images can be displayed with analog CRT technology such as that used in some electronic test equipment, medical monitors, radar displays, laser shows and early video games. Plotters are printers that use vector data rather than pixel data to draw graphics.

    SVG

    SVG (Scalable Vector Graphics) is an open standard created and developed by the World Wide Web Consortium to address the need (and attempts of several corporations) for a versatile, scriptable and all-purpose vector format for the web and otherwise. The SVG format does not have a compression scheme of its own, but due to the textual nature of XML, an SVG graphic can be compressed using a program such as gzip. Because of its scripting potential, SVG is a key component in web applications: interactive web pages that look and act like applications.

    External links

    Comparison of Graphics File Formats

    Ownership of the format and related information.

    Format Full name Owner File extension MIME type Application Patented
    ADRG ARC Digitized Raster Graphics .adrg
    ADRI ARC Digitized Raster Images .adri
    AGP ArtGem Project RL Vision .agp Preferred graphics format when working with ArtGem No
    AI Adobe Illustrator Document Adobe Systems .ai application/Illustrator Adobe Illustrator files are editable using programs that support the format, such as Adobe Illustrator, CorelDRAW, etc. Yes
    ART ART .art
    CADRG Compressed ARC Digitized Raster Graphics .cadrg
    CDR CorelDRAW Document Corel Corporation .cdr application/CorelDRAW CorelDRAW files are editable using programs that support the format, such as CorelDRAW, Adobe Illustrator, etc. Yes
    CGM Computer Graphics Metafile .cgm image/cgm
    CIN Cineon .cin image/cineon
    CPC Cartesian Perceptual Compression Cartesian Products, Inc. .cpc, .cpi image/cpi Highly compressed raster imaging format. Yes
    CPT Corel Photo-Paint Image .cpt
    DNG Digital Negative Adobe Systems .dng Open format intended to replace proprietary .raw files in digital cameras
    DPX Digital Picture eXchange file format .dpx image/dpx
    ECW Enhanced Compressed Wavelet File .ecw
    EMF Windows Enhanced Metafile .emf
    EXR OpenEXR ILM .exr image/exr Used in film effects for 3d rendering and hdr images. ?
    FH Macromedia Freehand Document .fh
    FLA Flash Source File .fla
    FPX FlashPix (1.0.2) .fpx image/vnd.fpx
    GIF Graphics Interchange Format CompuServe,
    Unisys (compression algorithm)
    .gif image/gif Supported by most web browsers. Supports transparency and animation. No
    HD Photo HD Photo Microsoft .wdp, .hdp image/vnd.ms-photo TIFF-like container format with HDR encoding for photographic images Yes (no licence costs)
    IMA .ima .ima team .ima Format for photographic images with HDR encoding. No
    IGS Initial Graphics Exchange Specification .gs image/iges
    ILBM InterLeaved BitMap Electronic Arts and Commodore Amiga .iff, .ilbm, .lbm image/x-ilbm Planar graphics format designed for Amiga graphics hardware. No
    JPEG Joint Photographic Experts Group Joint Photographic Experts Group .jpg, .jpeg (containers: .jfif, .jfi) image/jpeg Photographic images. Supported by most web browsers. No
    JPEG 2000 Joint Photographic Experts Group 2000 Joint Photographic Experts Group .jp2, .j2c image/jp2 Photographic images, eventual replacement for JPEG. Yes (no licence costs for part 1)
    Format Full name Owner File extension MIME type Application Patented
    MNG Multiple-image Network Graphics .mng video/x-mng
    MYD Myd format .myd
    MYV Myv vector format .myv
    ODG OpenDocument drawing .odg
    PBM Portable Bitmap File Format .pbm image/x-portable-bitmap
    PCD ImagePac Photo CD .pcd image/jpcd
    PCF Pixel Coordination Format .pcf image/pcf
    PCX ZSoft PC Paintbrush File ZSoft Corporation .pcx image/x-pcx Dated rle packed indexed image format, used in some early 3d shooting games like Unreal Tournament as it takes up very little space and is easy to decode. ?
    PGF Progressive Graphics File xeraina GmbH .pgf Photographic images, eventual replacement for JPEG. No
    PGM Portable Graymap File Format .pgm image/x-portable-graymap
    PICT PICT Apple Computer .pict, .pic, .pct image/pict Metafile for Mac OS, not meant for print publishing. Yes
    Pixel Pixel image format Pixel .px image/px Native format of the Pixel image editing program. ?
    PNG Portable Network Graphics World Wide Web Consortium .png image/png W3C endorsed replacement for GIF. Supported by most web browsers. No
    PPM Portable Pixmap File Format .ppm image/x-portable-pixmap Very easy to understand. Programs to analyze and write to this format are easily written.
    PSD Photoshop Document Adobe Systems .psd, .psb, .pdd image/psd, image/photoshop, image/x-photoshop Used mainly for storing image manipulation & editing data. Yes
    PSP Paint Shop Pro Document Corel Corporation .psp image/psp It can only be opened in programs that support the format, such as Paint Shop Pro, The GIMP, etc. ?
    SGI Silicon Graphics Image .sgi, .rgb, .rgba, .int, .inta, .bw
    SVG Scalable Vector Graphics World Wide Web Consortium .svg, .svgz (compressed) image/svg+xml Scriptable vector image format; supported by some web browsers, often via plug-in. No
    SXD OpenOffice.org 1.0 drawing format .sxd
    TGA Truevision Targa Truevision Inc. .tga, .tpic image/tga Used by many 3D rendering applications and 3d games. Yes?
    TIFF Tagged Image File Format Adobe Systems .tiff, .tif image/tiff Document scanning and imaging format, also functions as a container. No
    UFO Ulead File for Objects .ufo
    XAML Extensible Application Markup Language Microsoft .xaml application/xaml+xml Used by Windows Presentation Foundation and Microsoft Silverlight. ?
    XAR Xar .xar application/vnd.xara
    XBM X BitMap .xbm image/x-xbitmap
    XCF XCF, name derived from eXperimental Computing Facility .xcf application/x-gimp-image
    XPM X-Pixmap .xpm image/x-xpm
    Format Full name Owner File extension MIME type Application Patented
    Windows bitmap Windows bitmap Microsoft .bmp image/x-bmp Simple, usually uncompressed format for use primarily within Microsoft Windows. No
    WMBP Wireless Application Protocol Bitmap Format .wbmp image/vnd.wap.wbmp

    Technical Details

    Format Compression algorithm Raster / Vector Color depth Indexed color Trans­parency Meta­data Inter­lacing* Multi-page Ani­mation Layers Color manage­ment Extend­able HDR format
    AGP RLE Raster 32 No Yes No No No No Yes No No No
    AI Lossy & Lossless Vector & Raster 1, 8, 24, 32 (multiple palettes ?) Yes Yes Yes No No No Yes Yes ? No
    CDR Lossy & Lossless Vector & Raster 1, 8, 24, 32 (multiple palettes) Yes Yes Yes No Yes No Yes Yes ? No
    CPC CPC Raster 1 No No Yes No Yes No No No Yes, via embedded dictionary No
    EXR None, RLE, ZIP, Piz, PXR24, B44 Raster 16 - 128 (floating-point) No Yes Yes No No No No Yes Yes Yes
    GIF LZW Raster 1, 2, 3, 4, 5, 6, 7, 8 Yes Yes, index Yes Yes Yes Yes Yes No Yes (GIF89a) No
    HD Photo Lossy & Lossless bi-orthogonal transform Raster 1, 2, 8, 16, 24, 32, 48, 64, 128 (floating-point) No Yes Yes Yes Yes No No Yes Yes Yes
    ILBM Optional run-length encoding Raster 8-bit, 24-bit Yes No Yes Yes No Yes,
    Palette-shifting
    No No Yes No
    IMA Lossy and lossless original mutiresolution analysis transformation Raster 8-bit, 16-bit integer, 32-bit floating-point No Yes Yes No No No No Yes Yes Yes
    JPEG Lossy & Lossless, DCT, RLE, Huffman predictive nearest neighbor Raster 8-bit (greyscale), 12-bit, 24-bit No No Yes Yes No No No Yes No No
    JPEG 2000 Lossy & Lossless (DWT) Raster 8, 16 (greyscale) Up to 48-bit color? No Yes Yes Yes No No No Yes ? No
    PCX None, RLE Raster 1, 2, 4, 8, 24 Yes No No No No No No No No No
    PGF Lossy & Lossless (DWT) Raster greyscale: 1, 8, 16, 31; color: 12, 16, 24, 32, 48 No Yes Yes Yes No No No No ? No
    Format Compression algorithm Raster / Vector Color depth Indexed color Trans­parency Meta­data Inter­lacing* Multi-page Ani­mation Layers Color manage­ment Extend­able HDR format
    PICT None, RLE, QuickTime Raster & Vector 1, 2, 4, 8, 16, 24, 32 Yes Yes Yes ? No No No ? No? No
    Pixel GZIP Raster 1, 4, 8, 16, 24, 32 ? Yes Yes ? Yes Yes Yes Yes Yes Yes
    PNG Lossless, DEFLATE Raster 1, 2, 4, 8, 16, 24, 32, 48, 64 Yes (1-8 bit modes) Yes; Alpha channel 8b, 16b; 8b for indexed per-entry Yes Yes, Adam7 algorithm No No (see MNG and APNG) No Yes Yes, via chunks Yes
    PPM None Raster Up to 16 No No Yes No Yes No No No No No
    PSD None, RLE Raster & Vector 1, 2, 4, 8, 16, 24, 32, 48, 64 Yes Yes Yes N/A No Yes Yes Yes No? Yes
    PSP None Raster & Vector 1, 2, 8, 16, 24, 32, 48 Yes Yes Yes No ? No Yes ? ? No
    SVG None (can use lossless gzip) Vector 24, 32 No Yes Yes N/A No Yes Yes (vector based) No Yes, XML based N/A
    TGA None, RLE, and other Raster 1, 2, 4, 8, 16, 24, 32 Yes Yes Yes No No No No No ? No
    TIFF None, LZW, RLE, ZIP, and other Raster & Vector 1, 2, 4, 8, 16, 24, 32 Yes (1-8 bit modes) Yes Yes Yes, for JPEG compression Yes No Yes Yes Yes, via tags Yes, TIFF float
    XAML None Vector 32, 64 No Yes Yes N/A Yes Yes Yes No Yes Yes
    Windows bitmap None, RLE Raster 1, 4, 8, 16, 24, 32 Yes Yes Yes No No No No No No No

    Note: Interlacing is meant only for graphics file formats used over the web.


    This article is licensed under the GNU Free Documentation License. It uses material from Wikipedia Encyclopedia article "Image File Formats"

    Scientists and Inventors    Scientists and Inventors    Scientists and Inventors   

    My Dog Kelly

    Site Map ♣ About Us ♣ Patent-Invent ♣ Free Theses, Dissertations & Patents

    Comments and inquiries could be addressed to:
    webmaster@julianTrubin.com


    Last updated: August 2007
    Copyright © 2003-2007 Julian Rubin