-
• #2
I think this is caused due to the limited palette provided. Is there any way to customize the palette used in the arraybuffer?
-
• #3
Okay, at this point I've moved to using
Bangle.setLCDMode("80x80");
. However, I'm still stuck with the 8bit web palette, which looks bad. Is there any way to use another one? -
• #4
I looked into this some more, and it looks hardcoded. Is there any way to access the
graphicsInternal
object from JS? -
• #5
In the end, I think I'll use my own arraybuffer with a higher BPP and a lower resolution.
Edit: I ended up being forced to use the 8 bit web palette, so I just changed all of my images to use those colors. -
• #6
The issue is that when you create a 4 bit graphics, I believe it maps the colors values right through - but when you draw the image, 4 bits is treated as the Mac color palette.
The easiest thing to do is to supply a palette when drawing your 4 bit buffer:
let buf = Graphics.createArrayBuffer(120, 120, 4, {msb:true}); let bufimg = { with:120, height:120, bpp:4, palette = new Uint16Array([...]), buffer:buf.buffer } g.drawImage( bufimg, 0, 0, {scale: 2} );
and that might sort you out...
I was trying to use a image background for a clock. In order to prevent flickering, I wanted to use a buffer. However, when I draw the image background on the buffer, the image's colors are shifted.
With a buffer (brown colors):
Drawing directly to the screen (intended colors):
Is there any way to make the colors be the intended ones?
2 Attachments