Questions about Sprite formats
Pages: 1 2
Steffen Huber (91) 1953 posts |
New version available, see here for the formal announcement: https://www.riscosopen.org/forum/forums/1/topics/12330 |
Andy S (2979) 504 posts |
I think I’ll wake up this old thread rather than start a new one as the question’s relevant and it keeps the information together. Obviously the 8:8:8:8 ABGR format has an alpha value from 0-255, but for TBGR am I understanding correctly that the T value is like the old binary masks, where 0 is supposed to mean fully transparent and any non-zero value should be interpreted as fully opaque? |
Jeffrey Lee (213) 6048 posts |
I believe that the conventional use of the T field is for opacity/supremacy (i.e. inverse alpha), providing a gradient between 0 (fully visible) and 255 (fully invisible). I say “conventional”, because the field is intended to be used by genlock video hardware, to control how the computer’s screen output gets blended with an external TV/video signal. So the exact behaviour (when pixels are written to screen memory) will depend on how that hardware operates. The OS’s handling of the field is a bit loose; e.g. I think sprite plots either copy the value to screen (if no pixel format conversion is required), or reset it to zero. The only part of the OS I’ve seen which does something notable with the field is FontManager, which can blend text into transparent screen pixels. So basically, don’t expect it to behave like alpha channel or mask data, where the expected behaviour is more well understood (although, I think the OS’s handling of alpha channels is also a bit loose in places). |
Andy S (2979) 504 posts |
Thanks Jeffrey. Good job I asked! |
Gerald Holdsworth (2084) 81 posts |
I totally forgot I posted to this thread three years ago. Anyway, after a couple of years break, I’ve got back onto my Sprite Converter. Now runs on Windows, macOS and Linux. Full source code, and binaries, are here: The current version there is a beta version – however, I have version 1.00 ready to upload. Doesn’t support all sprites, but I’ll get there. Learning tons about sprites, and bitmaps, while writing this. Eventually, I’ll put a cut down version into Disc Image Manager, for viewing sprites. This version will also, eventually, import sprites from Bitmaps or PNGs and save as RISC OS sprites. The PNG support is not great – it works…well it did before I re-wrote a whole raft of the code for version 1.00. |
Pages: 1 2