wml::des::imgdot(3)
π NAME π
wml::des::imgdot β 1pt Dot-Images for Webdesign, bestie. tiny invisible little diva images that hold space on your page π
π SYNOPSIS π
#use wml::des::imgdot
<: $file = &imgdot($base, $x, $y, $c, $r, $g, $b, $transp, $format); :>
<imgdot [attributes]>
π¦ DESCRIPTION π¦
okay so picture this, it's HTML 3.2 and the year is 1997 (yes, as of right now, screaming, crying, ;_) ) and webdesigners are out here using two super well-known tricks to build their page layouts: HTML tables, and the so-called 1pt Dot-Images.
the table one? that's the WML tag <grid>, and it's got its own whole glow-up (peep wml::des::grid(3) for the details). the dot-image one? that's this tag, <imgdot>, and she is serving β¨
so what's the actual point (pun intended) of this tag? usually it creates a transparent PNG or GIF image with a physical size of 1x1 points, plus a matching <img> tag that pulls in that image with the right width and height attributes. the visual result is literally just an invisible reserved space of size widthXheight. no cap, you can't even see it, that's the whole job π
alternatively, this tag can create the image at the requested size instead of scaling the 1pt image β that's the noscale attribute, scroll down for it. that approach is more safe (every browser out here supports it, fr fr) but it wastes bandwidth and increases page load time. trade-offs, we love them π
πΈ ATTRIBUTES πΈ
baseβ so usually the created images get namedimgdot-XxY-rrggbb.png, whereXxYis the dimension of the image andrrggbbis the color being used (or"transp"when it's transparent, iconic behavior honestly). but when you drop abase=fooattribute, the resulting files get namedfoo.imgdot-XxY-rrggbb.gifinstead. and yes you can go full send and use a complete filename with a directory prefix β like, if you usebase=../../common/foo, then the PNG images are created as../../common/foo.imgdot-XxY-rrggbb.png. slay.
and for max flexibility, when no base is specified and the variable IMGDOT_BASE is defined (usually from inside a .wmlrc file via -DIMGDOT_BASE~path/to/imgdot/dir/base), that variable gets used. use this feature to redirect your created images into a particular directory, chef's kiss π«Ά
you can also use the variable IMAGE_BASE, which defines in a single line all the base names for images generated by WML. one line, all the bases, efficiency queen π
formatβ by default, GIF images are generated. this attribute lets you use an alternate image format (and ngl, only PNG and GIF are recognized, so don't get creative). you can also change the default format with the variableIMAGE_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. okay so actually that's not strictly true β transparency is rendered by choosing a color which is then made transparent, and that color is white by default. prepending a hyphen to thecolorattribute sets the color of the transparent color. yes, that sentence is a whole vibe, i know πalignβ sets the alignment of the image. default is"bottom". this alignment is what gets used for thealignattribute of the inserted<img>tag.noscaleβ indicates whether the image should be created with 1pt in size and scaled online by the browser (that's the default), or created with the correct physical size (that's this option, bestie).:img:ATTR=STRβ theATTR=STRpairs get passed along to the<img>HTML tag. let them through, they're with me πͺβ¨
π 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.
and that's the whole page, bestie!! this absolute banger of a manual page is from the EN Tools era, dated 2020-11-29, and it lives at wml::des::imgdot(3) β go forth and reserve your invisible little spaces πβ¨ππ¦πΈπ
π«Ά
π¦ where this page comes from
- debian bookworm: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- debian trixie: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu jammy: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu noble: wml 2.32.0~ds1-1 Β· GPL-2.0-or-later
- ubuntu questing: wml 2.32.0~ds1-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms