HELP! * GREY=local LOCAL HTML version of Foils prepared 7 April 1997

Foil 15 SFImage Specification of Hexadecimal Representation

From Overview of VRML 1.0 Language with Examples CPS616 Basic Information Track for Computational Science -- Winter-Spring Semester 96 and 97. by Geoffrey C. Fox, Alvin Leung, Meryem Ispirli * See also color IMAGE

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.



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun May 25 1997