Misc. HTML Topics:
The NATURALSIZEFLAG Attribute

= Index DOT Html by Brian Wilson [bloo@blooberry.com] =

Main Index | Tag Index | Tag Tree | Tag History
The Mysterious Attribute | Why It Happens
Attribute Values | The Implications



The Mysterious Attribute
Adobe corporation has two HTML editing products called 'SiteMill' and 'PageMill' (until recently only for the Macintosh platform) used to create HTML pages. In the course of creating and saving a web page that contains images (represented using the IMG tag in HTML), the editor would create an extra 'NATURALSIZEFLAG' attribute in the IMG tag. This attribute does not appear in any HTML standard, so it does not validate as legal syntax (causing many authors to wonder what was wrong with their documents.)

Why It Happens
When an image is inserted into a document using either of these editors, a reference for the image is created that includes the name, dimensions, and alignment of the image. This is then inserted in the document, along with the NATURALSIZEFLAG attribute, which is assigned an integer value of 0-3, such as with this example:

    <img SRC="test.gif" WIDTH=350 HEIGHT=100 ALIGN=bottom NATURALSIZEFLAG=3>

PageMill and SiteMill use the NATURALSIZEFLAG attribute to specify an image's actual or resized dimensions within the editor when updating or replacing the image. These editors determine the display size of an updated image using either the original image's actual dimensions, or by scaling the original image's dimension based on the NATURALSIZEFLAG attribute's value.

Attribute Values -
What They Mean

0 Indicates a horizontally and vertically resized image. When updating or replacing the referenced image, PageMill or SiteMill scales the updated image to maintain the dimensions of the original image.
1 Indicates a vertically resized image. When updating or replacing the referenced image, PageMill or SiteMill scales the updated image to maintain the only the height dimension of the original image.
2 Indicates a horizontally resized image. When updating or replacing the referenced image, PageMill or SiteMill scales the updated image to maintain only the width dimension of the original image.
3 Indicates an actual size image. When updating or replacing the referenced image, PageMill or SiteMill displays the updated image using the image's PageMill dimensions, and not the original image dimensions.

What Are the Implications?
Nothing will be harmed by removing the NATURALSIZEFLAG attribute, but the next time the document is opened and saved in either of these editors, it will be re-added to the document. The response received on the topic mentions that the attribute could possibly be dropped from future versions of the editors (it will probably depend on how vital it is to the scheme these editors use to manipulate images.)

The attribute can also be left in documents 'as-is' with no ill-effects, other than complaints from HTML validators (browsers will ignore the attribute.)


Boring Copyright Stuff...