NetSCADA Logo
Login
Home
Products
Support
Site Map
FAQ's
Web Demo
Resources
Links
Search
Company Info

Using Graphics Effectively - An Introduction     

  Whether it be an Industrial Automation application, the new and heralded release of an operating system, or the latest 3D game...Graphical User Interface (GUI) development can consume a great deal of time, money, and effort. Even more disconcerting is the reality that some end users may judge the success of your entire project on this facet alone. Beginning with this article, I hope to provide you with a few basic yet crucial facts about computer graphics (CG) such as image file formats, color depth, resolution, palettes, and CG jargon. Subsequent articles will cover a variety of visual or graphics-related topics. Ultimately I aspire to provide a solid foundation of computer graphics that allows you to ask the right questions and make informed decisions.


   The Basics – Pixels, Resolution, and Color Depth    To top of page

  Derived from the phrase "picture element," the term "pixel" refers to the smallest display unit on your monitor; it represents a single dot of color on your screen. It should make sense then that more dots or pixels per square inch of screen would yield better clarity or sharpness. So, doesn't it follow that the term "resolution" in the PC world refers to the number of pixels on your display? On a less abstract level, "resolution" refers to the width of your display in pixels by the height of your display in pixels. In the Windows Operating Systems "resolution" may be referred to as "Screen Area." If your display resolution is 640 x 480, for example, then your monitor is currently "coloring" 307,200 separate pixels (307,200 equals 640 pixels multiplied by 480 pixels). More pixels is usually better; 1,310,720 pixels (a 1280 x 1024 resolution) will provide you with a better-looking display with finer, cleaner edges on fonts or any non-horizontal or non-vertical lines. Just don't try to run a 1600 x 1200 resolution on an 11.1" laptop display...you might need a magnifying glass.

"Color Depth" refers to the number of colors that your system is configured to display. The personal computing world has progressed from monocolor displays during its infancy to the richness of "True Color" available with today"s moderately priced hardware. You have the following color depth options with current Windows operating systems:

Color DepthFormulaPossible Colors
16 colors (4 bit)24 colors16
256 colors (8 bit)28 colors256
High Color (16 bit)216 colors65,536
True Color (24 bit)224 colors16,777,216
True Color (32 bit)224 colors with an 8-bit alpha channel16,777,216 with 256 possible levels of transparency

Notice the correlation? The preceding table is meant to illustrate that the number of possible colors increases exponentially relative to the number of bits of video memory used for each pixel. You knew that already? It does work nicely, doesn’t it? What may not be readily obvious are the hardware requirements of your configuration. The following table illustrates the video memory required at various screen resolutions for all color depths


Required Video Memory for a given resolution and color depth (in Kb)
Image WidthImage Height
Color Depth
4 bits8 bits16 bits24 bits32 bits
6404801503006009001,200
8006002354699381,4061,876
10247683847681,5362,3043,072
11528644869721,9442,9163,888
128010246401,2802,5603,8405,120
160012009381,8753,7505,6257,500
192014401,3502,7005,4008,10010,800

If you are reading this article, chances are that you have clicked the "Settings" tab of the "Display Properties" dialog in Windows 95, 98 or NT 4.0. Perhaps you did not realize that the "Colors" and "Screen Area" limitations are a result, first and foremost, of the amount of video memory in your system. Let’s assume you are operating a PC with 2Mb of video memory at an 800 x 600 resolution at a color depth of 16.7 million colors. If you tried kicking up the resolution to 1024 x 768, the operating system dropped the color depth automatically to 16 bits since there was no way it could possibly pump out the required amount of pixels for a 24 bit color depth. And then you tried 1280 x 1024 and discovered, "Bummer, I can only run 256 colors at this resolution on my big, bad monitor!?"

What is going on here? Well, Windows outputs everything you see and manipulate on your monitor as a bitmap. Every button, scroll bar, toolbar, etc., everything is a bitmap. In spite of the fact that you may be viewing a compressed 1024 x 768, 24-bit, JPEG image (all JPEG files are compressed and 24 bits) that occupies only 250Kb on your hard disk, the operating system has "decompressed" the image so that it occupies 2,304Kb of video RAM. Big difference...and more than a few CPU clock cycles were utilized in the decompression. While using compressed image formats for transmission over a company intranet or the world wide web makes a lot of sense, are you willing to incur the performance hit of decompressing multiple, compressed images on one screen in an Industrial PC on the factory floor? In fact, many high-performance games and multimedia applications have utilized images with a 256-color palette or less whenever possible due to these very issues. We'll cover palettes in the next article.

Current technology and pricing may very well render these issues as unimportant in the very near future. But given a preference, I would opt for performance over style any day of the week. In the world of Industrial Automation, responsiveness to the process should be of paramount importance to the software designer or design engineer. Knowing the end user’s hardware is a definite advantage for delivering a high-performance app. Maybe a true color image will be best in your situation. However, you should know that the human eye cannot detect every single one of the 16.7 million colors that a PC can display. Moreover, many video cards and monitors are simply incapable of rendering every single "True Color". In general, if you want your application to seem agile and well designed, reduce the color depth in your images whenever possible, preferrably to no more than 256 colors. All the robust and efficient code, scripting, and well-designed databases cannot overcome "image bloat" on a PC with a substandard graphics subsystem.

   To top of page

 
 
Home | Products | Support | Resources | FAQ's | Links | Search
Web Demo | Site map | Company Info
 

Last updated: January 4, 2005
© 1999 - 2005 by NetSCADA, Inc.,   All Rights Reserved
For more information, E-mail   info@netscada.com
Send web site comments to our  Webmaster
Contact NetSCADA at (337) 839-1020.