Graphics CS 121 Concepts of Computing II. What is a graphic? n A rectangular image. n Stored in a file of its own, or … … embedded in another data file.
Published byModified over 4 years ago
Presentation on theme: "Graphics CS 121 Concepts of Computing II. What is a graphic? n A rectangular image. n Stored in a file of its own, or … … embedded in another data file."— Presentation transcript:
What is a graphic? n A rectangular image. n Stored in a file of its own, or … … embedded in another data file. n Displayed on a monitor screen, or … … printed on paper by programs. n Manipulated by graphics programs, or … … graphics tools built into other programs.
Graphics Characteristics n Three properties of a graphic... –Resolution how many pixels/dots per inch –Color Depth or Bit Depth how many colors –Size width and height
Resolution n Number of dots per inch (dpi) used to display or print the image (aka: ppi = pixels per inch). n Monitors: 72± dpi.
Resolution n Printers: 600 - 2400 dpi (±). n Effect: –Higher resolution = more memory. n Question… –How will the image be used? n Number of dots per inch (dpi) used to display or print the image (aka: ppi = pixels per inch). n Monitors: 72± dpi.
Color Depth or Bit Depth n Number of bits of memory used to store each pixel (dot). n Effect: –More colors = more memory. n #colors = 2 #bits n Overhead … color table. NOTE: Color may mean “shades of gray.”
Size n Sometimes confused with resolution. n Given as an pair of numbers… –width X height n Measured in… –inches –centimeters –pixels (dots) –picas (1/6”) –points (1/72”)
Compression n Why? –Save memory! n Two methods … –lossless = no loss of data –lossy = discards “unnecessary” or “redundant” data
Representations of Graphics n Raster (aka: Bit-Mapped) –Each pixel (dot) is represented by a series of bits (specifies its color) n Vector (aka: Object-Oriented) –Image is composed of discrete objects (lines, ellipses, rectangles, curves, polygons, text, …) represented by mathematical formulas. n Which requires more memory? –Depends on the complexity of the image.
Characteristics of Raster Graphics n Application –Photo-realistic images n Editing Tools –Paint programs n Editing Operations –Manipulate pixels or groups of pixels. n Resizing (primary disadvantage) –Larger = grainy –Smaller = loss of detail aka: Bit-Mapped Graphics
Characteristics of Vector Graphics n Application –Diagrams, Logos, and Clipart n Editing Tools –Draw programs n Editing Operations –Manipulate objects n Resizing –Larger or Smaller: No loss of quality. aka: Object-Oriented Graphics
Output of Graphics n Raster devices… –dot matrix printers –ink jet printers –laser printers –monitors n Vector devices… –plotters n Consequence… –Some translation must occur at the time of output.
Graphic File Formats n TIFF - Tagged Image File Format –most widely supported raster (bit-mapped) format –any resolution –any bit depth (color or gray-scale) –any size –filename extension:.tif 1 of 9
Graphic File Formats n EPS - Encapsulated PostScript –most widely supported vector (object oriented) format –for printers only! –can contain a bit-mapped image preview for display purposes –advantage: scaleable –filename extension:.eps 2 of 9
Graphic File Formats n JPEG - Joint Photographic Experts Group –raster (bit-map) –primary applications: photographs web pages (one of three formats supported) –lossy compression (variable) –two forms: 256 gray-scale 16.7 million colors –filename extension:.jpg 3 of 9
Graphic File Formats n GIF - Graphics Interchange Format –raster (bit-map) –primary applications: diagrams and clipart web pages (one of three formats supported) –lossless compression –maximum of 256 colors or grays –special features… interlacing transparent color animated –filename extension:.gif 4 of 9
Graphic File Formats n PNG - Portable Network Graphics –raster (bit-map) GIF look-a-like (royalty free) –primary applications: photographs, diagrams, and clipart web pages (one of three formats supported) –lossless compression –three forms… gray-scale, 16.7 million colors, 256 colors –special features… dual direction interlacing, variable transparency –filename extension:.png 5 of 9
Graphic File Formats n BMP - Bit-mapped Graphic –standard raster (bit-map) format for Windows –16.7 million colors –filename extension:.bmp 6 of 9
Graphic File Formats n WMF - Windows Meta File –standard vector format for Windows –can contain a bitmap image –filename extension:.wmf 7 of 9
Graphic File Formats n PICT - Picture –standard graphic format for Macintosh –raster (bit-map) or vector (object-oriented) –16.7 million colors or 256 grays –filename extension:.pct or.pict 8 of 9
Graphic File Formats n Others………. –One web site lists over 100 formats! http://www.wotsit.org/cgi-bin/search.cgi?graphics –Most are proprietary. n Which format do you use? –Depends on the application. 9 of 9
Sources of Graphics n Image Processing Programs –paint for raster (bit-map) –draw for vector (object-oriented) n Scanner n Clip-art and Photo Libraries (CD’s) n Digital Camera n Video Capture n Internet (?) Warning: Graphics ARE Copyrighted!