[photodesk] Re: Saving 24b Sprites with mask in 3.06

  • From: "David J. Ruck" <druck@xxxxxxxxxxxx>
  • To: photodesk@xxxxxxxxxxxxx
  • Date: Fri, 23 Jun 2006 12:38:47 +0100

Gavin Crawford <gav@xxxxxxxxxxxxxxxxxxxx> wrote:

> Photodesk 3.06 no longer seems to include any mask data when saving a
> 24bit RGB sprite. It works as expected when saving a CMYK sprite.
> Anyone know how I can change Photodesk so it saves the mask for RGB
> sprites. It used to work fine in 3.03.

Photodesk does save the mask alpha channel in a 24bpp sprite, as you can
see if you reload it - the mask is still there. However, while Photodesk
will import the simple on/off mask in a 24bpp sprite, in converts this to a
256 level alpha channel, and when saving out preserves this by putting the
information in the spare 8bpp of each pixel. But other RISC OS applications
such as !Paint wont recognise this as a mask, and its also incompatible
with the implementation of alpha sprites in Select.

When saving other sprite variants such as 'packed' 15bpp and CMYK, a sprite
format compatible 1bpp mask is generated, and the 8bpp alpha channel
information is lost, as there are no spare bits to store it in those sprite
formats. When saving a 256 colour 'indexed' sprite it does again preserve
the alpha channel as the sprite mask has 8bpp available - however the
sprite format specifies these bytes should only be 0 or all set, so !Paint
and the OS routines wont handle the mask data correctly.

Now the question is, did versions up to 3.03 also generate a compatible
1bpp mask? I can't check now as I dont have any old copies with me, but I
recall Photodesk has always dones this bending of the sprite format rules
to preserve the full alpha channel. If anyone wants to test it, create a
masked 24bpp sprite in !Paint, save it, load it in to Photodesk 3.03 and
resave as a different name and check the file lengths. If it preserved the
mask, they will be the same size, if not the Photodesk one is approx 1/32th


Email: druck@xxxxxxxxxxxx
Phone: +44- (0)7974 108301
  Web: http://www.druck.org.uk/

Other related posts: