Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
William Leue Guru Joined: 03/07/2020 Location: United StatesPosts: 405
Posted: 01:29pm 09 May 2024
Copy link to clipboard
Print this post
I am running version 5.07 firmware on my CMM2 Gen 2. I am trying to draw some icons that I created by reading the images from a BMP file into an offscreen page, and then blitting the icons from the offscreen page to the current onscreen page.
I am using the &B100 optional argument to blit to suppress copying transparent pixels, which for me are black ones. My icons have some regions that I want to look black, so I am coloring those regions rgb(NOTBLACK). I checked and this seems to be working: the value of rgb(NOTBLACK) is 251666432.
However, when the icons are displayed, the NOTBLACK regions are being treated as transparent, so they do not appear.
I am guessing that the problem may be that when I created the BMP file originally using SAVE IMAGE, it did not correctly save the NOTBLACK regions, but made then true black instead. Or possibly the problem happened with the LOAD BMP command. I know that blit works correctly.
Any clues? -Bill
William Leue Guru Joined: 03/07/2020 Location: United StatesPosts: 405
Posted: 02:22pm 09 May 2024
Copy link to clipboard
Print this post
Ah, I found the problem! It turns out that in order to correctly save NOTBLACK to a BMP file and load it back in again from the file, you cannot use 8-bit colors. Changing to 16-bit colors with MODE 1,16 fixes it.
-Bill
stanleyella Guru Joined: 25/06/2022 Location: United KingdomPosts: 2681