MetaSprite

© Cerilica 2022-2023

MetaSprite allows MetaData to be embedded within individual Sprites or (from v0.20) within the whole sprite file, extends the types of Palette that can be created, and fixes several problems with ColourTrans’ handling of 256 colour Sprites.

NEW! I’ve extended MetaSprite’s API to manipulate File MetaData in the sprite file’s Extension Area as well as the existing Sprite MetaData functionality.

Note that despite !Paint being the de facto RISC OS Sprite editor, it dates to RISC OS 2.0 and hence predates some of the APIs that MetaSprite modifies – !Paint is therefore very bad at coping with modified Sprites, and ought to be updated to use the APIs provided by RISC OS 3.0. I don’t think that would be rushing things, under the circumstances. Pleasingly, !Draw seems to manage perfectly.

Most interchange bitimage formats support MetaData in some form, so it’s about time that RISC OS Sprites did too. However, this is not limited to mere Title, Author and Creation Date strings. Instead, MetaSprite turns the Sprite into a chunky image format more akin to TIFF or JPEG, and as such the Sprite can be augmented with arbitrary amounts of binary information, such as an ICC Profile or Exif Camera Settings.

As this is a complicated subject and this is a programmer’s API, I’m not going to provide any technical details on this page. Download the zip file above. It contains an API document, a lengthy technical explanation, example Sprite and DrawFile exhibits, and a couple of demo programs in legible Basic.

I am currently using MetaData in sprites to implement:

There’s so many other possible applications – a very exciting and powerful module.

Bonus:

Also includes the NoSpriteImage module at no additional charge!

NoSpriteImage formalises and enables a Sprite construction containing no Image pixels, for those Sprites intended to be plotted as a Mask only.

Again, there is a technical document, and a couple of example files.

This is an experiment. I’m not sure how I feel about the results.

Releases

0.10 (21 Feb 2022)  Initial candidate

0.11 (04 Apr 2022)  Removal of last MetaData chunk removes Data Area

0.12 (22 Apr 2022)  Small bugfix to SpriteOp,36 so “HOT” works correctly

0.20 (12 Mar 2023) NEW SpriteOp,23 for File MetaData

0.21 (26 Mar 2023) Bugfix for obscure combination of SpriteOps 37 and 23.