cosmigo
 
 
 
 
 
 
 
 
 
Member of ASP
You are here: Home (Pro Motion) > Plugins > Sample File Filter

Sample File Filter

The sample file filters are two file i/o plugins to read and write a very simple image and animation file type. Both plugins come with full C++ source as MS Visual Studio project.

Download the whole sources from here and extract the zip somewhere.

To see plugins working you can copy the precomiled DLLs sanAnimIo.dll and simImgIo.dll from the Release subfolder of the just downloaded and extracted zip to the plugins subfolder within your pro motion installation. After restarting pro motion you will have a new image file type "SIM Sample Image" and a new animation file type "SAN Sample Animation". They can be found at all usual image or animation load/save functions where you can select file types.

The file format specification is very simple for both file types.

SIM file format
Position (bytes) Type Description
$00 4 ASCII-chars File type specifier: SIMG
$04 Byte Version, currently set to 1
$05 DoubleWord Image width in pixels
$09 DoubleWord Image height in pixels
$0d Integer Transparent color or -1 of not defined
$11 Boolean Alpha layer enabled/present
$12 256*3 Bytes The 256 color table with the values Red, Green, Blue
$312 256 Bytes The 256 alpha value table if alpha is enabled
... width * height Bytes The image color pixels
... width * height Bytes The image alpha references if alpha is enabled

SAN file format
Position (bytes) Type Description
$00 4 ASCII-chars File type specifier: SANM
$04 Byte Version, currently set to 1
$05 DoubleWord Image width in pixels
$09 DoubleWord Image height in pixels
$0d Integer Transparent color or -1 of not defined
$11 Boolean Alpha layer enabled/present
$12 DoubleWord Number of frames
$16 256*3 Bytes The 256 color table with the values Red, Green, Blue
$316 256 Bytes The 256 alpha value table if alpha is enabled
For every frame the following data is included
... Word Delay in milliseconds before the next frame may be displayed
... width * height Bytes The image color pixels
... width * height Bytes The image alpha references if alpha is enabled