Graphics File Formats - PowerPoint PPT Presentation

About This Presentation
Title:

Graphics File Formats

Description:

Human eye can distinguish 224 colors ... added, the closer to white we get ... Primary colors subtracted (absorbed) from white to create new colors (reflected) ... – PowerPoint PPT presentation

Number of Views:176
Avg rating:3.0/5.0
Slides: 41
Provided by: billg96
Learn more at: http://web.cs.wpi.edu
Category:

less

Transcript and Presenter's Notes

Title: Graphics File Formats


1
Graphics File Formats
2
Graphics Data
  • Vector data
  • Lines
  • Polygons
  • Curves
  • Bitmap data
  • Array of pixels
  • Numerical values corresponding to gray-level or
    color of set of pixels

3
Types of Formats
  • Bitmap
  • TIFF, GIF, JPEG
  • Vector
  • AutoCAD DXF
  • Metafile
  • Can contain both bitmap and vector data in the
    same file
  • Macintosh PICT

4
Types of Formats
  • Animation
  • TDDD, TTDDD
  • Multimedia
  • Apple QuickTime
  • MPEG

5
Types of Formats
  • 3D
  • Descriptions of shape and color of 3D object
    models (scene elements)
  • Models placed in scenes with lights and cameras
  • Autodesks DXF
  • Used by rendering programs like Autodesks 3D
    Studio

6
Types of Formats
  • VRML
  • Hybrid of 3D graphics and HTML
  • Audio
  • Video
  • Fonts

7
Pixels and Coordinates
8
Display
  • Fewer colors than device can display

9
Display
  • More colors than device can display

10
Display
  • Quantization artifacts
  • Banding
  • Moire patterns
  • New colors not present in image

11
Palettes
  • 1-dimensional array of color values
  • Color map
  • Index map
  • Color table
  • Look-up table
  • Bitmap data in a file stored as series of index
    values
  • Pseudo-color storage

12
Palettes
  • Can easily change, say, all red pixels to green

13
Palettes
  • Palette element
  • 24 or 32 bits
  • (0,0,0)
  • (255,255,255)
  • (255,0,0)
  • (0,255,0)
  • (0,0,255)
  • (255,255,0)
  • (0,255,255)
  • (255,0,255)
  • (128,0,0)
  • (0,128,0)
  • (0,0,128)
  • (128,128,0)
  • (0,128,128)
  • (128,0,128)
  • (128,128,128)
  • (255,128,128)

14
Palettes
  • 320 ? 200 image with 3 bytes of color information
    per pixel and up to 256 colors
  • Image without palette would take 3202003 bytes
    of storage, or 192,000 bytes

15
Palettes
  • 320 ? 200 image with 3 bytes of color information
    per pixel and up to 256 colors
  • Image with 1 byte palette would take 3202001
    2563 (length of palette) bytes of storage, or
    64,768 bytes
  • For small amounts of data, palette length could
    outweigh savings in color encoding

16
Color Spaces
  • Composite colors are defined by specifying three
    values for amounts of fundamental colors, or
    color channels
  • Color is a point in color space

17
Color Spaces
  • RGB
  • Red, green, and blue
  • (R,G,B)
  • (0, 0, 0) is black
  • (100, 100, 100) is white
  • (50, 50, 50) is light gray
  • (100, 0, 0) is red
  • (0, 100, 0) is green
  • (0, 0, 100) is blue

18
Color Spaces
  • RGB
  • 24 bit RGB
  • Range is 0-255
  • (0, 0, 0) is black
  • (255, 255, 255) is white
  • (127, 127, 127) is light gray
  • (255, 0, 0) is red
  • (0, 255, 0) is green
  • (0, 0, 255) is blue

19
Color Spaces
  • Truecolor
  • Human eye can distinguish 224 colors
  • Device equal to or exceeding this is said to
    display truecolor
  • No palette needed
  • First byte is R, second byte is G, third byte is
    B

20
Color Systems
  • Additive color systems
  • Adding colors to black creates new colors
  • The more colors that are added, the closer to
    white we get
  • Presence of all colors creates white, while
    absence of all colors creates black
  • Additive color environments are self-luminous
  • Color on monitors

21
Color Systems
  • Subtractive color systems
  • Primary colors subtracted (absorbed) from white
    to create new colors (reflected)
  • The more colors that are subtracted, the closer
    to black we get
  • Presence of all primary colors creates black,
    while absence of all primary colors creates white
  • Subtractive color environments are reflective
  • Color on paper

22
Color Systems
  • RGB
  • Additive
  • Most widely used
  • For graphics monitors

23
Color Systems
  • CMY
  • Cyan-Magenta-Yellow
  • Subtractive
  • Used by most laser and ink-jet printers
  • CMYK
  • K stands for black, which is treated
    independently
  • Glossy magazines
  • A dot of composite color is a grouping of four
    dots, each one a CMYK color

24
Color Systems
  • HSV
  • Hue-Saturation-Value
  • Hue
  • Specifies color
  • Saturation
  • Called chroma
  • Refers to amount of white in a hue
  • Fully saturated hue contains no white and is pure
  • Red hue with 50 saturation is pink

25
Color Systems
  • HSV
  • Value
  • Called brightness
  • How much light color emits
  • Hue with high value is very bright
  • Hue with low value is black
  • Color system used by painters
  • Add white, black, and gray to pure pigments to
    create tints, shades, and tones

26
Color Systems
  • HSV
  • Tints
  • A pure, fully saturated color combined with white
  • Shade
  • A pure, fully saturated color combined with black
  • Tone
  • A pure, fully saturated color combined with black
    and white (gray)
  • Saturation is the amount of white added
  • Value is the amount of black added
  • Hue is the color that is added to

27
Overlays and Transparency
  • Images are often overlaid on live video sources
    at rendering time
  • On TV, still images are shown next to live
    talking heads on the news
  • Normal images are opaque
  • To allow image overlay, some means must exist to
    specify transparency of an image, an image area,
    or an image pixel

28
Overlays and Transparency
  • Add overlay bit to image pixel value
  • When bit is set, rendering application ignores
    those pixel values
  • A rendering application can selectively toggle
    overlay bit in all pixel values of a given color
  • Person standing in front of a contrasting,
    uniformly colored background screen of a color
    which doesnt appear elsewhere

29
Overlays and Transparency
  • A rendering application can selectively toggle
    overlay bit in all pixel values of a given color
  • Rendering application can toggle overlay bits of
    all pixels of this background color, leaving an
    image of the person cut out from the background
  • This cut-out image can be overlaid on any other
    image
  • Chromakeying
  • 256 levels of transparency

30
Bitmap Files
  • Image data header information
  • Raw format files
  • Just image data
  • Organization
  • Header
  • Bitmap data

31
Bitmap Files
  • Organization
  • Header
  • Bitmap data
  • Footer
  • Header
  • Palette
  • Bitmap data
  • Footer

32
Bitmap Files
  • Organization
  • Header
  • Bitmap data
  • Palette
  • Header
  • Palette
  • Scan line table
  • Color correction table (here)
  • Bitmap data
  • Color correction table (or here)
  • Footer

33
Bitmap Files
  • Organization
  • Header
  • Palette
  • Bitmap index
  • Bitmap 1 data
  • Bitmap N data
  • Footer

34
Bitmap Files
  • Organization
  • Header
  • Palette
  • Bitmap index
  • Palette 1
  • Bitmap 1 data
  • Palette 2
  • Bitmap 2 data
  • Palette N
  • Bitmap N data
  • Footer

35
Bitmap Files
  • Header
  • Binary or ASCII data
  • Composed of fixed fields
  • Format of header varies
  • Types of fields
  • File identifier
  • File version
  • Number of lines per image
  • Number of pixels per line

36
Bitmap Files
  • Header
  • Types of fields
  • Number of bits per pixel
  • Number of color planes
  • Compression type
  • X-origin of image
  • Y-origin of image
  • Text description
  • Unused space

37
Bitmap
  • Header
  • File identifier
  • Unique identifier which identifies the format
  • GIF
  • File version
  • For GIF, 87a or 89a
  • Number of lines per image
  • Image length
  • Image height
  • Number of scan lines

38
Bitmap
  • Header
  • Number of pixels per line
  • Image width
  • Scan line width
  • Number of bits per pixel
  • Per color plane
  • Number of bytes per pixel is pixel depth
  • X and Y origins
  • Indicates where image lies on output device

39
Color Correction Table
  • Information to help rendering application in
    displaying an image on a device different from
    the one assumed by the creator application

40
Scan-Line Table
  • An array of offset values used to index the
    location of each scan line
  • Each offset value indicates the starting position
    of each scan line
Write a Comment
User Comments (0)
About PowerShow.com