The PNG Guide is an eBook based on Greg Roelofs' book, originally published by O'Reilly. |
Home PNG Options and Extensions Physical Scale (sCAL) | ||||||||||||
Physical Scale (sCAL)
Table 11-5 shows the format of sCAL; it is quite simple.
Two units are defined: meters (unit specifier = 1) and radians (unit specifier = 2). The size of a pixel in the given units, both horizontally and vertically, is given by a pair of positive floating-point numbers encoded as ASCII strings and separated by a null byte. The most general form of a floating-point string includes an optional leading sign (+ or -), zero or more decimal digits (0-9, the ``integer part''), an optional decimal point followed by zero or more decimal digits (the ``fractional part''), and an optional e or E followed by an optional sign and one or more digits (the ``exponent part''). Either the integer part or the fractional part must contain at least one digit, but everything else may be omitted. Thus, 1 and .1 are valid floating-point numbers, as is +123.4567e-089. Note that the exponent is interpreted as a power of 10 (10-89 in the third example) to be multiplied by the integer and fractional parts; this is the computer version of what is sometimes referred to as scientific notation.
|
||||||||||||
Home PNG Options and Extensions Physical Scale (sCAL) |