Re: best way to load large background graphic
by Jeff Kane <jeffkane(at)pobox.com>
|
Date: |
Fri, 12 Oct 2001 16:48:16 -0400 |
To: |
"Lonna Poland" <lonna(at)granbury.com> |
Cc: |
hwg-graphics(at)hwg.org |
References: |
granbury |
|
todo: View
Thread,
Original
|
|
>I have a large map which I have to use for a background graphic. We
>don't want the map graphic to tile.
>
>1. How can I prevent the large map from tiling as a background?
>
>2. What is the best way to optimize the graphic so it won't take
>forever to load?
>
>Thanks,
>
>Lonna
Lonna,
I don't think you can prevent the map from tiling. But you can
increase its physical dimensions so that it's too large to tile on
most monitors. For example, if the map is 800 pixels x 500 pixels,
you could increase the canvas size (e.g., in Photoshop) to 1300 by
1100), adding the extra canvas on the right and the bottom. The map
would then be unlikely to tile, since most monitors have resolutions
less than those dimensions. I'm assuming here that the page's content
is of comparable size to the background map. If you create a long
page that scrolls, you may need to increase the canvas dimension even
more.
An alternative may be (?) to use javascript so that the background
floats and moves as the user scrolls down the page.
One way to minimize the file size would be to convert the graphic to
GIF format and decrease the number of colors to a minimum. You may
also want to reduce the opacity of the background so it doesn't
interfere with the page's content.
The extra canvas space added shouldn't affect file size much since it
would be a flat area of one color that compresses easily.
Of course, if the same background is used on multiple pages, it only
needs to load in the first time.
You probably also want to specify a background color which will
appear before the background loads.
Jeff
--
HWG: hwg-graphics mailing list archives,
maintained by Webmasters @ IWA