wml::des::preload(3) EN Tools wml::des::preload(3)NAME
wml::des::preload - Preload Images
SYNOPSIS
#use wml::des::preload
<preload src=<image filename> via=<trick>>
DESCRIPTION
This include file provides the "<preload>" tag which can be used to preload images. Such preloading is usually done to speedup access for
following pages. Currently there are only a few tricks how this can be done.
The following combinations are currently supported:
"src="anyimage "via=size"
Preloads the image anyimage by using an "<img>" tag with the attributes "width=1 height=1" which leads to the loading of the image but
only to a 1 pixel in display.
Advantage: Works for all browsers.
Disadvantage: This approach has the nasty side-effect of an occuring 1 pixel in display because "width=0 height=0" does not work as
expected in most browsers (especially in Netscape 4.x). So, position your "<preload>" tag somewhere it does not destroy the look and
feel of your page.
"src="anyimage "via=js"
Preloads the image anyimage by using a JavaScript snippet which loads the image by declaring an unused "Image" object.
Advantage: Silently preloads the image without displaying anything.
Disadvantage: Only works for browsers with a JavaScript implementation and only for those who support the "Image" object (currently
NS/3, NS/4, IE/4).
AUTHORS
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Denis Barbier
barbier@engelschall.com
REQUIRES
Internal: P1, P2
External: --
SEE ALSO wml::std::tags(3) HTML 3.2 "<img>" tag.
EN Tools 2014-04-16 wml::des::preload(3)
Check Out this Related Man Page
wml::des::imgdot(3) EN Tools wml::des::imgdot(3)NAME
wml::des::imgdot - 1pt Dot-Images for Webdesign
SYNOPSIS
#use wml::des::imgdot
<: $file = &imgdot($base, $x, $y, $c, $r, $g, $b, $transp, $format); :>
<imgdot [attributes]>
DESCRIPTION
Currently (as of HTML 3.2 and 1997 ;_) webdesigners use two commonly known tricks for creating their layout on webpages: HTML tables and
so-called 1pt Dot-Images. The first one is nicely supported by the WML tag "<grid>" (see wml::des::grid(3) for details), the latter is
supported by this "<imgdot>" tag.
The usual purpose of this tag is to create a transparent PNG or GIF image with a physical size of 1x1 points and a corresponding "<img>"
tag which includes this image with appropriate "width" and "height" attributes. The visual result is a invisible reserved space of size
"width"X"height". Alternatively this tag can create the image with the requested size instead of scaling the 1pt image (see the "noscale"
attribute below). This approach is more safe (all browsers support this) but wastes bandwith and increases page load time.
ATTRIBUTES
base
Usually the created images are named imgdot-XxY-rrggbb.png where "XxY" is the dimension of the image and "rrggbb" the used color (or
`"transp"' for transparent). When you use a "base=foo" attribute, then the resulting files are named foo.imgdot-XxY-rrggbb.gif.
Actually you can even use a complete filename including a directory prefix, i.e. when you use "base=../../common/foo" attribute, then
the PNG images are created as ../../common/foo.imgdot-XxY-rrggbb.png.
And for most flexibility when no base is specified and the variable "IMGDOT_BASE" is defined (usually from within a .wmlrc file via
"-DIMGDOT_BASE~path/to/imgdot/dir/base") it is used. Use this feature to redirect the created images to a particular directory.
You may also use the variable "IMAGE_BASE" which defines in a single line all base names for images generated by WML.
format
By default, GIF images are generated. This attribute lets you use an alternate image format (actually only PNG and GIF are recognized).
You may also change the default format with the variable "IMAGE_FORMAT".
width
Specifies the width (x-dimension) of the reserved space in pixel. Default is 1 pixel.
height
Specifies the height (y-dimension) of the reserved space in pixel. Default is 1 pixel.
color
Sets the color of the image. Default is transparent, i.e. no color. In fact, this is not true, transparency is rendered by choosing a
color which is made transparent, which is white by default. Prepending an hyphen to the "color" attribute sets the color of the
transparent color.
align
Sets the alignment of the image. Default is `"bottom"'. This alignment is used for the "align" attribute of the inserted "<img>" tag.
noscale
Indicates if the image should be created with 1pt in size and scaled online by the browser (default) or should be created with the
correct physical size (this option).
:img:ATTR=STR
The ``ATTR=STR'' pairs are passed along to the "<img>" HTML tag.
AUTHOR
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Denis Barbier
barbier@engelschall.com
REQUIRES
Internal: P1, P2, P3
SEE ALSO
HTML <"img"> tag.
EN Tools 2014-04-16 wml::des::imgdot(3)