 |
We have
learned how to embedd an image into an HTML file, but in many cases you
must first produce the image or change what you have. |
|
 |
Producing means either to
"paint" or "draw" it with some program, or to scan a real
picture to convert it to an electronic format. |
|
 |
Changing means that your
electronic image is too small. too large, too dark. to bright, ...., or that
you want to include some lettering, or that you want to combine two indeendent
images into one, or...., you get the idea. |
|
 |
Most student presentations and many Internet documents do not
fully exploit the potential of images (they have not enough contrast and so
on), use unsuitable sizes (too small, can't see a thing on the picture) or
include unreadable text (especially the lettering of axis). |
|
 |
This does not have to be and we will devote some time to
demonstrate how to make and to optimize images. |
 |
In any case, you first must use some graphics
program to generate the image that you finally will use in your HTML document
and there are two very different kinds of such programs |
|
 |
Pixel programs simply
assign a fixed number of pixels to the image size (many pixels = high
resolution; few pixels = low resolution) and simply store whats inside a pixel.
For black and white images this simply is the brightness of a pixel (= grey
scale); for color images it is the brightness for the three primary colors (as
in the hexadecimal code used
in HTML) |
|
 |
This is simple and straightforward, but has two major
shortcoming: 1. It is hard to change anything after it was stored and 2. if you
change the size of the image (but not of the pixels) you must somehow combine
pixels and this leads quickly to distortions, especially for text. |
|
 |
Vector programs store
geometric figures (lines, circles, rectangles, letters, ..) together with their
attributes (location, size, color, ...). |
|
 |
Ths is not simple and straightforward, but allows to change
all elements of a n image at will and to change its size without loss of
information. However, while well suited to graphical images
("drawings"); "vector graphic" cannot possibly encode a
photography, a painting, or even a computer "painting". |
 |
So both kinds of programs are necessary to cover
all aspects of images. And often the result of neither one can be directly
incorporated into a HTML document because this needs specific file formats
(ways the image is stored); always in a pixel kind of format. |