plutovg
plutovg copied to clipboard
adapting plutovg to read/write RGB565 bitmaps
Hi there. I'm working on a fork of your neat little library for use on embedded systems.
One optimization I'm attempting to make is the ability to do direct writes to particular types of bitmaps, or otherwise it uses callbacks to write to arbitrary sources it can't "directly" bind to. I got the callbacks working, and the "direct binds" work for RGBA8888 bitmaps, but not RGB565. Some of my colors are off.
Firstly, I have a question. BYTE_MUL() in plutovg-blend.c: it appears to multiply each channel by 1/255 of the alpha value passed in.
So when you use it, you're basically doing half the blend, up front, and then completing the blend with the destination pixel for each pixel in the loop.
Is that an accurate description of what you're doing there?
Also I'm attempting to do it with RGB565 and it's infuriating me, in part because RGB565 is big endian in order to work with 90% of the actual true color display hardware out there on embedded platforms.
I've got composition_solid_source somewhat working but I don't understand the intent of composition_solid_source_over.
Is it one of these? https://en.wikipedia.org/wiki/Blend_modes
And if so which one? I'm a little lost here, so anything you can tell me about this functionality - particularly with the thought in mind that I don't have an alpha channel to work with - I'd be so grateful.
Thanks in advance.