11.07.2015 Views

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

Encyclopedia of Computer Science and Technology

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

214 graphics formats<strong>of</strong> objects so they look as if they have three dimensions,appearing in proper perspective, with regard to what objectsare behind other objects, <strong>and</strong> with realistic lighting <strong>and</strong>shading (see computer graphics).Traditionally, all <strong>of</strong> the work <strong>of</strong> producing the actualscreen data was undertaken by the PC’s main processor,executing instructions from the application program <strong>and</strong>display driver. By putting a separate processor on the videocard (called a video accelerator), together with its own supply<strong>of</strong> memory (now up to 256 MB), the main system wasfreed from this burden. A new high-b<strong>and</strong>width connectionbetween the PC motherboard <strong>and</strong> the graphics card becameavailable with the development <strong>of</strong> the AGP (AcceleratedGraphics Port). (See bus.) Memory used on video cards isalso optimized for video operations, such as by using types<strong>of</strong> memory such as Video RAM (VRAM) that do not need tobe refreshed as frequently.Increasingly, the algorithms for creating realistic images(such as lighting, shading, <strong>and</strong> texture mapping) are nowsupported by the s<strong>of</strong>tware built into the video card. Ofcourse, the applications program needs a way to tell thegraphics routines what to draw <strong>and</strong> how to draw it. Insystems running Micros<strong>of</strong>t Windows, a program functionlibrary called Direct3D (part <strong>of</strong> a suite called DirectX) hasbecome the st<strong>and</strong>ard interface between applications <strong>and</strong>graphics hardware. Video card manufacturers in turn haveoptimized their cards to carry out the kinds <strong>of</strong> operationsimplemented in DirectX. (A nonproprietary st<strong>and</strong>ard calledOpenGL has also achieved some acceptance, particularly onnon-Windows systems.)In evaluating video cards, the trade<strong>of</strong>f is between theextent to which advanced graphic features are supported<strong>and</strong> the number <strong>of</strong> frames per second that can be calculated<strong>and</strong> sent to the display. If the processing becomes too complicated,the frame rate will slow down <strong>and</strong> the display willappear to be jerky instead <strong>of</strong> smooth.Further Reading“Graphics <strong>and</strong> Displays.” Tom’s Hardware. Available online. URL:http://www.tomshardware.com/graphics/index.html. AccessedAugust 5, 2007.Jones, Wendy. Beginning DirectX 10 Game Programming. Boston:Course <strong>Technology</strong>, 2007.Luna, Frank. Introduction to 3D Game Programming with DirectX9.0c: A Shader Approach. Plano, Tex.: Wordware Publishing,2006.Sanchez, Julio, <strong>and</strong> Maria P. Canton. The PC Graphics H<strong>and</strong>book.Boca Raton, Fla.: CRC Press, 2003.Shreiner, Dave, et al. OpenGL Programming Guide. 5th ed. UpperSaddle River, N.J.: Addison-Wesley Pr<strong>of</strong>essional, 2005.“Video Cards.” PC Guide. Available online. URL: http://www.pcguide.com/ref/video/index.htm. Accessed August 5, 2007.graphics formatsBroadly speaking, a graphics file consists <strong>of</strong> data that specifiesthe color <strong>of</strong> each pixel (dot) in an image. Since there aremany ways this information can be organized, there are avariety <strong>of</strong> graphics file formats. The most important <strong>and</strong>widely used ones are summarized below.BMP (Windows Bitmap)In a bitmap format there is a group <strong>of</strong> bits (i.e. a binaryvalue) that specifies the color <strong>of</strong> each pixel. Windows providesst<strong>and</strong>ard bitmap (BMP) formats for 1-bit (2 colorsor monochrome), 4-bit (16 colors), 8-bit (256 colors), or24-bit (16 million colors). The Windows bitmap format isalso called a DIB (device-independent bitmap) because thestored colors are independent <strong>of</strong> the output device to beused (such as a monitor or printer). The relevant devicedriver is responsible for translating the color to one actuallyused by the device. Because it is “native” to Windows, BMPis widely used, especially for program graphics resources.Bitmap formats have the advantage <strong>of</strong> storing the exactcolor <strong>of</strong> every pixel without losing any information. However,this means that the files can be very large (fromhundreds <strong>of</strong> thous<strong>and</strong>s <strong>of</strong> bytes to several megabytes forWindows screen graphics). BMP <strong>and</strong> other bitmap formatsdo support a simple method <strong>of</strong> compression called runlengthencoding (RLE), where a series <strong>of</strong> identical pixels isreplaced by a single pixel <strong>and</strong> a count. Bitmap files can befurther compressed through the use <strong>of</strong> utilities such as thepopular Zip program (see data compression).EPSEPS (Encapsulated PostScript) is a vector-based rather thanbitmap (raster) format. This means that an EPS file consistsnot <strong>of</strong> the actual pixel values <strong>of</strong> an image, but the instructionsfor drawing the image (including coordinates, colors,<strong>and</strong> so on). The instructions are specified as a text file inthe versatile PostScript page description language. This formatis usually used for printing, <strong>and</strong> requires a printer thatsupports PostScript (there are also PostScript renderers thatrun entirely in s<strong>of</strong>tware, but they tend to be slow <strong>and</strong> somewhatunreliable).GIFGIF, or Graphics Interchange Format, is a bitmapped formatpromulgated by CompuServe. Instead <strong>of</strong> reserving enoughspace to store a large number <strong>of</strong> colors in each pixel, thisformat uses a color table that can hold up to 256 colors.Each pixel contains a reference (index into) the color table.This means that GIF works best with images that have relativelyfew colors <strong>and</strong> for applications (such as Web pages)where compactness is important. GIF also uses compressionto achieve compactness, but unlike the case with JPEGit is a lossless compression called LZW. There is also a GIFformat that stores simple animations.JPEGJPEG, which st<strong>and</strong>s for Joint Photographic Experts Group,is widely used for digital cameras because <strong>of</strong> its ability tohighly compress the data in a color graphics image, allowinga reasonable number <strong>of</strong> high-resolution pictures to bestored in the camera’s onboard memory. The compressionis “lossy,” meaning that information is lost during compression(see data compression). At relatively low compressionratios (such as 10:1, or 10 percent <strong>of</strong> the original image size)changes in the image due to data loss are unlikely to be

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!