Spritefile is a Python-based software that facilitates the reading and writing of Spritefiles. Its features include conversion and interoperability tools, making the process more efficient.
RISC OS is relatively behind when it comes to supporting non-native image formats. Hence, many of the images found on a RISC OS workstation are stored in Spritefiles. Moreover, Spritefiles are still relevant because they support multiple images within a single file, a feature that some types of applications neglect.
The Spritefile module is a library of classes specifically created to interpret the contents of Drawfiles effectively. Creating support for objects containing sprites required an immense amount of work; hence, a separate module was created explicitly for this purpose. Spritefile's interface is similar to the one implemented for the Python GUI Library. The module comprises pure Python code, but to boost image processing, it features some methods that manipulate image data that were implemented in a separate library written in Pyrex.
Spritefile format has been modified and extended numerous times by several parties over the years. Therefore, it is highly likely that numerous Spritefiles in existence currently may not be interpreted accurately by this module. However, it supports new-style sprites with 1, 2, 4, 8, 16, and 32 bits per pixel. The software also supports old-style sprites with mode numbers, provided that the mode numbers are in a list of known values. Masks in all the color depths listed, palettes with 2, 4, 16, 64, and 256 entries, including the standard RISC OS 16 color palette, and the default 64-entry VIDC palette, and CMYK sprites to a limited extent.
This software also comprises spr2img and spr2other tools that put a straightforward command-line interface on top of the spritefile module. This allows users to extract images in formats supported by the Python Imaging Library. Spr2img extracts all the images within the Spritefile in the desired format, while spr2other enables users to extract named images to particular files of the desired design.
For the software to work efficiently, it requires Python. A recent change in this release is that the license has been changed to the GNU General Public License.
Version 0.22: N/A