Amulet Bitmap Format

All images stored within the Amulet serial data flash are saved in an Amulet proprietary format. Most images are compressed when saved, but when dealing with Dynamic Image Widgets, the HTMLCompiler leaves the canvas image uncompressed. When an external processor sends a new image serially to the Amulet, the Amulet replaces the existing image stored in the serial data flash with the incoming image. To keep from overwriting other files within the serial data flash, the image to be sent to the Amulet must be the exact same dimensions as the canvas image. The first 11 bytes of the new image to be sent to the Amulet must be identical to the first 11 bytes of the original canvas image of the Dynamic Image Widget. The first 11 bytes can be found in the .map file generated by the Amulet HTMLCompiler for your specific project.

The first six bytes of an Amulet file are the flash header bytes. The next 5 bytes, when dealing with an image file, is as follows:

byte 0 - 5: Amulet flash header bytes.
byte 6: # of rows, in pixels. (LSByte)
byte 7: # of rows, in pixels. (MSByte)
byte 8: # of columns, in pixels. (LSByte)
byte 9: # of columns, in pixels. (MSByte)
byte 10: bytes per row. ((# of rows + 7) / 8)

The MSBit of the first data byte is the topleft pixel of the image. Each byte consists of 8 pixels. Byte 10 of the header is the number of bytes per row. If the number of row pixels is not an exact multiple of 8, then the unused pixels of the last byte of each row will be padded with 0's.

As an example, if an image is 65 pixels wide, the number of bytes per row will be 9. The last byte of each row will consist of the MSBit being the last pixel for each row, and the rest of the byte will be all 0's.

As another example, we'll use a 10 x 11 pixel image with the following pixels set:     


Amulet HTMLCompiler,
Copyright © 2000-2004 by
Amulet Technologies, LLC

Back to Welcome - Contact Amulet - Amulet Home