Digital Images and the Web
Web pages would be pretty boring if they were all just text. Indeed, they were just text documents at the inception of the Web. The infrastructures of the Web and the underlying Internet were such that data transmission speeds were nowhere as fast as they are today and could not handle transferring images of any size efficiently. Today's transmission speeds are nowhere near as fast as they will be tomorrow. Still, the download speeds of client internet connections (as we have tested in our speed test assignment) are the key issue in determining how we formulate media for the Web.
Digital Image
A digital image is a still image (as opposed to a video) that is represented in digital form as a file of pixels. Recall from previous discussions that:
- pixel stands for picture element
- each pixel is a single color
- a single color
- is commonly represented as a combination of red, blue, and green, which are primary colors
- all other colors can be represented as combinations of the three primary colors
- the amount of red, green, and blue that makes up the color of a pixel is given as an 8-bit string for each of the red, green, and blue components
- there are thus 256 different red, 256 different green, and 256 different blue levels that can be represented for a pixel for a total of 256 x 256 x 256 = 16,777,216 different colors.
- instead of the colors being represented as a bit string of 24 bits (8 bits for each of three colors) they are usually represented as 6 hexadecimal digits (one hexadecimal digit for each 4-bit section of the 24 bit string), 2 hexadecimal digits for red, 2 for blue, and 2 for green.
- a pixel is thus represented as three bytes in file.
- the minimum file size for an uncompressed digital image is thus the number of pixels in the image times three, that is, three bytes would be needed to record each pixel in the file.
- clever compression algorithms, such as jpeg, are used to make that file size much smaller than it would be in uncompressed form.
Acquiring Digital Images
Digital images are acquired in a number of ways, including:
- recorded by a digital camera
- obtained from a phyisical image, such as a photograph, through use of a digital scanner
- created with illustration software (e.g. Adobe illustrator)
In each case, an image that we can see with our eyes is digetized, that is, converted to a binary representation as a set of pixels as described above, with each pixel being represented as three bytes.
Example: Digital Photographs
A digital photograph is obtained by the light of the camera lens being focused on a rectangular light sensor in the camera body. The sensor is comprised of large number of individual color sensors arranged in rows. Each individual light sensor measures the color of light reaching it as a red, green, blue combination. The computer and software embeded in the camera then records each pixel color as a 3-hexadecimal digit value in a file on the camera's flash drive (actually most cameras also run an encoding algorithm, such as jpeg, on the file as it stores it).
Consider the illlustration of a camera sensor below.
This illustration shows 12 individual sensors per row with 8 rows. Real cameras range in both sensor size and individual sensor elements per row. In general, there will be thousands of pixel sensors in a single row.