1 / 40

Graphics File Formats

Graphics File Formats. Graphics Data. Vector data Lines Polygons Curves Bitmap data Array of pixels Numerical values corresponding to gray-level or color of set of pixels. Types of Formats. Bitmap TIFF, GIF, JPEG Vector AutoCAD DXF Metafile

zaynah
Télécharger la présentation

Graphics File Formats

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 Graphics File Formats

  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 Graphics File Formats

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

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

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

  7. Pixels and Coordinates Graphics File Formats

  8. Display • Fewer colors than device can display Graphics File Formats

  9. Display • More colors than device can display Graphics File Formats

  10. Display • Quantization artifacts • Banding • Moire patterns • New colors not present in image Graphics File Formats

  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 Graphics File Formats

  12. Palettes • Can easily change, say, all red pixels to green Graphics File Formats

  13. 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) Palettes Graphics File Formats

  14. Palettes • 320  200 image with 3 bytes of color information per pixel and up to 256 colors • Image without palette would take 320*200*3 bytes of storage, or 192,000 bytes Graphics File Formats

  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 320*200*1 + 256*3 (length of palette) bytes of storage, or 64,768 bytes • For small amounts of data, palette length could outweigh savings in color encoding Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  22. Color Systems • RGB • Additive • Most widely used • For graphics monitors Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 doesn’t appear elsewhere Graphics File Formats

  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 Graphics File Formats

  30. Bitmap Files • Image data + header information • Raw format files • Just image data • Organization • Header Bitmap data Graphics File Formats

  31. Bitmap Files • Organization • Header Bitmap data Footer • Header Palette Bitmap data Footer Graphics File Formats

  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 Graphics File Formats

  33. Bitmap Files • Organization • Header Palette Bitmap index Bitmap 1 data … Bitmap N data Footer Graphics File Formats

  34. Bitmap Files • Organization • Header Palette Bitmap index Palette 1 Bitmap 1 data Palette 2 Bitmap 2 data … Palette N Bitmap N data Footer Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

  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 Graphics File Formats

More Related