Paint and ARGB565/ABGR565
André Timmermans (100) 648 posts |
While testing some routines for all possible 16bpp color modes combinations while I have only a single machine, I used the PI’s 64K color modes, doing as if it was the tested mode, took screen dumps and altered the sprite mode word to show them correctly in Paint. In my zeal I used modes words corresponding to ARGB565 and ABGR565 and Paint showed them as completely transparent. On the other hand, as a sprite with an alpha mask they could be considered valid, but the screen dump of course had none. |
Andy S (2979) 504 posts |
Please can you tell me the actual values of the two mode words you used, so I can test them? So should Paint have rejected the sprite or should it (or actually the OS) have plotted the sprite as opaque? I’m going from memory here but I don’t think Paint attempts to validate sprites you load into it. It would instead rely on whether OS_SpriteOp generates an error. On the other hand, as a sprite with an alpha mask they could be considered valid, but the screen dump of course had none. I’ve got a build of Paint here that can create sprites with alpha masks or alpha channels. I just made a 64k colour sprite with an alpha mask. Like it did for you, it showed as completely transparent, even when I painted over it. However, I was in a 16M colour screen mode. Dropping to a 64K screen mode, it renders correctly so that’s worth a try. However, if the OS thinks your sprite has an alpha mask (due to the mode word) but it actually doesn’t, then I don’t know how it would behave, or whether it’s your responsibility (for supplying an invalid sprite) or the OS’s, for what happens. |
André Timmermans (100) 648 posts |
0×78a08051 // ABGR565 0×78a0C051 // ARGB565 |