SFImages are written to file as three integers nxpixel nypixel numcomponents=1..4
-
representing the width, height and number of components in the image, followed by nxpixel*nypixel hexadecimal values representing the pixels in the image, separated by whitespace.
|
A one-component image will have one-byte hexadecimal values representing the intensity of the image.
-
For example, 0xFF is full intensity, 0x00 is no intensity.
|
A two-component image puts the intensity in the first (high) byte and the transparency in the second (low) byte.
|
Pixels in a three-component image have the red component in the first (high) byte, followed by the green and blue components (so 0xFF0000 is red).
|
Four-component images put the transparency byte after red/green/blue (so 0x0000FF80 is semi-transparent blue).
-
A value of 1.0 is completely transparent, 0.0 is completely opaque.
|