10.1 Image Basics


10.1 Image Basics

Images can be categorized by the manner by in which they are stored, displayed, and manipulated. Images fall into two general categories: raster and vector.

10.1.1 Raster Images

A raster image or perhaps more correctly termed an image stored in a raster format is represented by a series of picture elements or pixels of equal size . The raster format breaks an image into a grid of pixels and records color information for each pixel.

The number of colors that can be represented by each pixel depends on the number of bits used to record each pixel, a term commonly referred to as the "pixel color depth." Because each pixel in a file will have the same color depth, the term is also commonly used as a reference to a file's color representation.

10.1.1.2 Color Depth

A raster image with a color depth of one bit per pixel is restricted to providing a black or white color representation as only two choices are available per bit position. Most raster image formats support more than one bit per pixel, permitting more than one level of color per image. Table 10.1 lists some common bits-per-pixel values supported by popular raster image formats and the corresponding maximum number of colors.

Table 10.1: Maximum Color Support versus Bits-per-Pixel

Bits-per-Pixel

Maximum Number of Colors

1

2

2

4

4

16

8

256

16

32,768

24

16,777,216

In examining the entries in Table 10.1, several items are worth discussing that may influence the manner by which you use images. First, the capability of many personal computers, to include most PCs manufactured prior to 1994, are limited to displaying a maximum of 256 colors. Second, a color depth of 24 bits is commonly referred to as "true color" as human eyesight cannot normally distinguish colors beyond those supported by a 24-bit color depth. Although a few scanners now support a color depth of 32 bits per pixel, scanning at that color depth could result in a conversion to a lower color depth as some of the more commonly used raster file formats support a lesser number of bits per pixel.

10.1.2 Vector Images

A second category by which images are stored and displayed is based on the use of direct line segments in place of pixels. Those line segments are recorded as mathematical formulas, with the resulting shape referred to as a vector image. Although a vector image is scalable without distortion and normally results in significantly smaller files than raster-based files, vector data cannot reproduce photographic realistic images.

Photographs taken with a digital camera, scanned images, and creative art drawn using a pixel-based "paint" program are examples of raster images. In comparison, a series of algorithms that represent the positioning and placement of lines and arcs created using a computer-aided design (CAD) program would be stored as a vector image. Because employee pictures in personnel files, real estate applications that include photographs of interiors and exteriors of homes , and most World Wide Web pages are based on the use of raster images, the focus of this chapter is also upon this category of graphics representation. In addition, because the data storage requirements of raster-based images can exceed by several orders of magnitude the data storage requirements of vector-based images, it is the former type of image that can be expected to significantly consume LAN bandwidth. Thus, our focus on raster-based images will provide an understanding of where the majority of bandwidth-associated imaging problems arise, as well as enable a description of methods you can consider to alleviate those problems.

10.1.3 Why Images Are a Problem

To understand the data storage problem associated with the use of raster images, let us assume that you have just returned from the store with the results of your latest camera operation and noted a photograph that could be useful for incorporation into a server-based application. Off you go to your friend down the hall who has a scanner connected to his PC.

10.1.3.1 Storage Considerations

Let us assume your friend sets the resolution of his scanner to 300 dots per inch for both horizontal and vertical resolution. If your color photograph measures 3.5 by 5 inches, the scanned image will require 300 300 bits/inch times 17.5 square inches divided by 8 bits/byte for a total of 196,875 bytes of storage, without considering a color depth beyond one bit per pixel. If you selected a 256-color resolution scan, 8 bits per pixel would be required, while for true color, 24 bits per pixel would be required. Getting out your calculator, your computations would note that the data storage requirements to store the image with a 256-color resolution would be 1,575,000 bytes, while its true color storage would require 4,725,000 bytes. To place the previously described image storage requirements in perspective, consider a full screen of text where each character could be displayed in one of 256 colors. That screen would consist of 80 25 characters , for a total of 2000 bytes. Adding one color attribute byte to represent the color depth of each displayed character would result in a requirement to store 4000 bytes. Note that this is almost 1/400 of the data storage required for the previously described 256-color resolution image. Table 10.2 provides a comparison of the data storage requirements of the previously described image at three different color depths to a screen of text.

Table 10.2: Text versus Image Storage

Type of File [*]

Data Storage (Bytes)

Image with color depth of 1

196,875

Image with color depth of 8

1,575,000

Image with color depth of 24

4,725,000

Screen of text with color depth of 8

4,000

[*] Image is a 3.5 5 inch photograph scanned at 300 300 bits/inch.

10.1.3.2 Transmission Delays

Although 10BASE-T Ethernet and Token Ring LANs operate at 10 and 16 Mbps, respectively, in actuality their bandwidth is shared among network users. This means that a network consisting of 200 users having an average of ten percent of its workstations attempting to use the LAN at any particular point in time results in a reduction of the average bandwidth to 10 Mbps/20 or 500 kbps per user on an Ethernet and 16 Mbps/20 or 800 kbps per user on a Token Ring network. Of course, this quick calculation does not consider the effect of collisions on an Ethernet, nor the flow of station management frames on a Token Ring network, which would further reduce the average bandwidth obtainable by each user. This also means that downloading the previously described 256-color image on the Ethernet LAN could require 1.575 Mbytes/500 kbps, or over three seconds. For the true color version of the image, the time would triple as the data storage required for a true color raster image is triple that of a 256-color image.

Although you might be tempted to say "so what" concerning a three-or nine-second delay, as other LAN users begin to work with applications that use images the delays become cumulative. For example, as five users near simultaneously query a visual database to retrieve the previously described 256-color image, the last person to press the Enter key or click on a Windows button could expect to encounter a delay exceeding 15 seconds. Just think what this does for time-sensitive frames, such as SNA data bound for a mainframe where delays of a few seconds can result in session timeouts. Fortunately, there are several methods you can consider to reduce the effect of images upon LAN performance. Some methods, such as LAN segmentation, adding switching hubs and boosting servers to Fast Ethernet, ATM or another high-speed technology, can result in a considerable expenditure of funds and may be ultimately necessary to implement. However, on occasion, there are other possible solutions to the problems resulting from the transportation of images on LANs that can be performed through software and in many instances may not require any additional expenditure of funds. Those possible solutions are based on the fact that scanning software as well as image viewing programs normally support multiple file formats. Some formats are limited to recording the image as is on a pixel-by-pixel basis, while other formats support the use of one or more compression algorithms to reduce the quantity of data prior to its actual storage. Because a good LAN manager or network administrator, like a shopper, likes a bargain, we first examine some of the more popular file formats used to store images, to include their support of different types of compression. Once this is accomplished, we describe and discuss several methods that can be used to adjust images, which reduces their effect on network bandwidth. Note that these methods may not be applicable to some applications, such as medical imaging where every pixel counts. However, for other applications, the loss of a small amount of resolution may be an acceptable trade-off for significantly reducing the storage required for an image as well as decreasing the time required to transport the image on a network. After examining the effect of image formats on storage, we turn our attention to other solutions that can be applicable to reducing the effect of transmitting images on other network users. Those solutions will involve the use of hardware and, as you might surmise, represent more expensive methods for supporting images than software-based solutions.




Enhancing LAN Performance
Enhancing LAN Performance
ISBN: 0849319420
EAN: 2147483647
Year: 2003
Pages: 111
Authors: Gilbert Held

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net