Presentation is loading. Please wait.

Presentation is loading. Please wait.

Graphics File Formats. 2 Graphics Data n Vector data –Lines –Polygons –Curves n Bitmap data –Array of pixels –Numerical values corresponding to gray-

Similar presentations


Presentation on theme: "Graphics File Formats. 2 Graphics Data n Vector data –Lines –Polygons –Curves n Bitmap data –Array of pixels –Numerical values corresponding to gray-"— Presentation transcript:

1 Graphics File Formats

2 2 Graphics Data n Vector data –Lines –Polygons –Curves n Bitmap data –Array of pixels –Numerical values corresponding to gray- level or color of set of pixels

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

4 Graphics File Formats4 Types of Formats n Animation –TDDD, TTDDD n Multimedia –Apple QuickTime –MPEG

5 Graphics File Formats5 Types of Formats n 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

6 Graphics File Formats6 Types of Formats n VRML –Hybrid of 3D graphics and HTML n Audio n Video n Fonts

7 Graphics File Formats7 Pixels and Coordinates

8 Graphics File Formats8 Display n Fewer colors than device can display

9 Graphics File Formats9 Display n More colors than device can display

10 Graphics File Formats10 Display n Quantization artifacts –Banding –Moire patterns –New colors not present in image

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

12 Graphics File Formats12 Palettes n Can easily change, say, all red pixels to green

13 Graphics File Formats13 Palettes n 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 Graphics File Formats14 Palettes n 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

15 Graphics File Formats15 Palettes n 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

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

17 Graphics File Formats17 Color Spaces n 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 Graphics File Formats18 Color Spaces n RGB –24 bit RGB n 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 Graphics File Formats19 Color Spaces n Truecolor –Human eye can distinguish 2 24 colors –Device equal to or exceeding this is said to display truecolor –No palette needed n First byte is R, second byte is G, third byte is B

20 Graphics File Formats20 Color Systems n 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 n Color on monitors

21 Graphics File Formats21 Color Systems n 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 n Color on paper

22 Graphics File Formats22 Color Systems n RGB –Additive –Most widely used –For graphics monitors

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

24 Graphics File Formats24 Color Systems n HSV –Hue-Saturation-Value –Hue n Specifies color –Saturation n Called chroma n 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 Graphics File Formats25 Color Systems n HSV –Value n Called brightness n How much light color emits n Hue with high value is very bright n Hue with low value is black –Color system used by painters n Add white, black, and gray to pure pigments to create tints, shades, and tones

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

27 Graphics File Formats27 Overlays and Transparency n 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 n Normal images are opaque n To allow image overlay, some means must exist to specify transparency of an image, an image area, or an image pixel

28 Graphics File Formats28 Overlays and Transparency n Add overlay bit to image pixel value –When bit is set, rendering application ignores those pixel values n 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

29 Graphics File Formats29 Overlays and Transparency n 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 n 256 levels of transparency

30 Graphics File Formats30 Bitmap Files n Image data + header information –Raw format files n Just image data n Organization –Header Bitmap data

31 Graphics File Formats31 Bitmap Files n Organization –Header Bitmap data Footer –Header Palette Bitmap data Footer

32 Graphics File Formats32 Bitmap Files n Organization n Header Bitmap data Palette n Header Palette Scan line table Color correction table (here) Bitmap data Color correction table (or here) Footer

33 Graphics File Formats33 Bitmap Files n Organization –Header Palette Bitmap index Bitmap 1 data … Bitmap N data Footer

34 Graphics File Formats34 Bitmap Files n Organization –Header Palette Bitmap index Palette 1 Bitmap 1 data Palette 2 Bitmap 2 data … Palette N Bitmap N data Footer

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

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

37 Graphics File Formats37 Bitmap n Header –File identifier n Unique identifier which identifies the format –GIF –File version n For GIF, ‘87a’ or ‘89a’ –Number of lines per image n Image length n Image height n Number of scan lines

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

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

40 Graphics File Formats40 Scan-Line Table n An array of offset values used to index the location of each scan line n Each offset value indicates the starting position of each scan line


Download ppt "Graphics File Formats. 2 Graphics Data n Vector data –Lines –Polygons –Curves n Bitmap data –Array of pixels –Numerical values corresponding to gray-"

Similar presentations


Ads by Google