Re: Image size specifications

Ka-Ping Yee (
Tue, 1 Aug 1995 23:48:12 -0400

Date: Tue, 1 Aug 1995 23:48:12 -0400
From: Ka-Ping Yee <>
Subject: Re: Image size specifications 
To: "Daniel W. Connolly" <>
In-Reply-To: <>
Message-Id: <>

In a previous message (available at [1]) i wrote:
> I had a look at the <fig> and <img> tags in the proposed HTML 3.0 
> specification, and i was a bit shocked to discover that image sizes
> could be specified only in device-specific means (pixels or en-widths).

but did not specify any references.  Specifically, the "proposed
specification" i was referring to is the hypertext version available at
[2] in its current version (draft-ietf-html-specv3-00.txt), with
descriptions of the <img> and <fig> tags at [3] and [4] respectively.

Both [3] and [4] specify that the default units are pixels, and only
offer en-units as the other choice.

Dan Connolly responded:
> I don't see how en units are device specific. They're relative to the
> font size. OK, for speech, this is meaningless. But giving image sizes
> is an "expedient hack" for optimizing the speed of laying out pages
> online, as far as I can tell. If you don't like it, don't use it.
> But I don't see what harm it does.

Making pixels the default units encourages people to lay out their
pages in a very device-specific fashion.  I suggest that WIDTH and
HEIGHT might not be purely "hacks" to achieve precise pixel counts,
but actually offer some display-dependent flexibility instead:

> I'm of the fairly strong opinion that one should be able to specify
> sizes relative to the "available area" for an object (which might be
> the window size or document length, for instance).

In other words, i'm suggesting a "percentage" specification for sizes,
and further suggesting that this is preferable to pixel units.

The rationale for this hit me in the face when i visited one of Arena's
demonstration pages [5] that is part of the "Tour of HTML 3".  There,
two figures are used to produce left and right borders for the text:

> <title>A Quick Review of HTML 3.0</title>
> <FIG align=bleedleft src=border.gif></FIG>
> <FIG align=bleedright src=border.gif></FIG>
> <h1>Figures</h1>
> ...

Naturally, the borders are *always* the wrong length, and are a great
waste of transmission bandwidth, since they contain a repeating
pattern.  Percentage size specification would solve the first problem,
while the second could be addressed with an attribute like
FILL="tile" or FILL="scale" (the default for compatibility).

With <HR SRC="bar.gif" WIDTH="100%" FILL="scale">, for instance, one
could obtain a horizontal rule always the correct size.  If the above
code were changed to

> <title>A Quick Review of HTML 3.0</title>
> <FIG align=bleedleft src=border.gif height="100%" fill="tile"></FIG>
> <FIG align=bleedright src=border.gif height="100%" fill="tile"></FIG>
> <h1>Figures</h1>
> ...

where height="100%" refers to "maximum available height" (i.e. height
of the rendered document) both problems would be solved.


Ping (Ka-Ping Yee):   2B Computer Engineering, University of Waterloo, Canada | 62A Churchill St, Waterloo, N2L 2X2, 519 886-3947
CWSF 89, 90, 92; LIYSF 90, 91; Shad Valley 92; DOE 93; IMO 91, 93; ACMICPC 94
: Amano Ai : Hayakawa Moemi : Hiyama Hikaru : Tendou Akane : Ayukawa Madoka :
WWW maintainer for the Canadian Space Agency - <>