MetaSprite

© Cerilica 2022

MetaSprite allows MetaData to be embedded within individual Sprites, extends the types of Palette that can be created, and fixes several problems with ColourTrans’ handling of 256 colour Sprites.

Beta Release version is 0.12 (22 Apr 2022) [32bit]

Important: This is a Beta Release. It has been observed to pass a set of tests on two versions of the OS, but may still contain serious bugs. Please save anything important before trying it out.

Also 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.

  • MetaSprite provides the new SpriteOp,39 to deal with MetaData.

  • The module increases the number of Palette types that can be created by SpriteOp,37.

  • It augments SpriteOp,36 “Set Pointer” with the ability to embed the coordinates of the pointer hot-spot in a MetaData chunk that automatically overrides the provided coordinates when present.

  • MetaSprite provides support for Truncated Palettes, which make “optimal” and converted Sprites much more memory efficient, especially when 8bpp.

  • And finally it fixes a number of bugs in ColourTrans regarding 8bpp Sprites.

As this is a complicated subject and this is a Beta Release, 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.


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