Click here to Skip to main content
15,885,941 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralThis bug makes me want to cry Pin
honey the codewitch12-Apr-21 3:20
mvahoney the codewitch12-Apr-21 3:20 
GeneralRe: This bug makes me want to cry Pin
Greg Utas12-Apr-21 3:33
professionalGreg Utas12-Apr-21 3:33 
GeneralRe: This bug makes me want to cry Pin
honey the codewitch12-Apr-21 3:52
mvahoney the codewitch12-Apr-21 3:52 
GeneralRe: This bug makes me want to cry Pin
Member 1299508712-Apr-21 4:35
Member 1299508712-Apr-21 4:35 
GeneralRe: This bug makes me want to cry Pin
k505412-Apr-21 4:45
mvek505412-Apr-21 4:45 
GeneralRe: This bug makes me want to cry Pin
honey the codewitch12-Apr-21 4:53
mvahoney the codewitch12-Apr-21 4:53 
GeneralRe: This bug makes me want to cry Pin
Member 1299508712-Apr-21 5:13
Member 1299508712-Apr-21 5:13 
GeneralRe: This bug makes me want to cry Pin
honey the codewitch12-Apr-21 5:59
mvahoney the codewitch12-Apr-21 5:59 
I don't have the driver code built yet. I'm building the graphics end of it right now.

At any rate, supporting 18-bpp wasn't even my initial goal.

It's just that you can do this:

C++
// 24-bit BGR
using bgr888 = pixel<
    channel_traits<channel_name::B,8>,
    channel_traits<channel_name::G,8>,
    channel_traits<channel_name::R,8>
>;    
// 16-bit RGB
using rgb565 = pixel<
    channel_traits< channel_name::R,5>,
    channel_traits<channel_name::G,6>,
    channel_traits<channel_name::B,5>
>;
// 8-bit grayscale
using gsc8 = pixel<
    channel_traits<channel_name::L,8>
>;
// 1-bit monochrome
using mono1 = pixel<
    channel_traits<channel_name::L,1>
>;
// 8-bit RGB
using rgb888 = pixel<
        channel_traits<channel_name::R,8>,
        channel_traits<channel_name::G,8>,
        channel_traits<channel_name::B,8>
    >;
// 18-bit RGB
using rgb666 = pixel<
        channel_traits<channel_name::R,6>,
        channel_traits<channel_name::G,6>,
        channel_traits<channel_name::B,6>
    >;

using pixel_type = rgb666;
using bmp_type = bitmap<pixel_type>;

pixel_type p = color<pixel_type>::light_green;

uint8_t buf[bmp_type::sizeof_buffer(16,16)];

bmp_type bmp(16,16,buf);

bmp[point16(7,7)]=p;
p = bmp[point16(7,7)];


No matter how I declare a pixel, it has to work. The channel bit depths and even the number of channels and their types are arbitrary. The only thing above that even requires an RGB color model is the source colors like light_green above and they are convertible to the destination format in cases of black&white vs RGB

I think the ILI9341 doesn't align it's frame buffer in 18-bit mode, but I could be wrong.

Either way, it doesn't matter, since the above has to work.

(It's possible to add a NOP channel to a pixel, so I can pad out an 18-bit pixel to 24 bits)
Real programmers use butterflies

GeneralRe: This bug makes me want to cry Pin
Member 1299508712-Apr-21 20:36
Member 1299508712-Apr-21 20:36 
GeneralRe: This bug makes me want to cry Pin
Richard MacCutchan12-Apr-21 5:11
mveRichard MacCutchan12-Apr-21 5:11 
GeneralRe: This bug makes me want to cry Pin
Greg Utas12-Apr-21 5:27
professionalGreg Utas12-Apr-21 5:27 
GeneralRe: This bug makes me want to cry Pin
honey the codewitch12-Apr-21 6:37
mvahoney the codewitch12-Apr-21 6:37 
GeneralRe: This bug makes me want to cry Pin
Greg Utas12-Apr-21 7:01
professionalGreg Utas12-Apr-21 7:01 
GeneralRe: This bug makes me want to cry Pin
honey the codewitch12-Apr-21 7:09
mvahoney the codewitch12-Apr-21 7:09 
GeneralRe: This bug makes me want to cry Pin
Greg Utas12-Apr-21 7:20
professionalGreg Utas12-Apr-21 7:20 
GeneralRe: This bug makes me want to cry Pin
Daniel Pfeffer12-Apr-21 20:26
professionalDaniel Pfeffer12-Apr-21 20:26 
GeneralRe: This bug makes me want to cry Pin
Greg Utas13-Apr-21 1:00
professionalGreg Utas13-Apr-21 1:00 
GeneralRe: This bug makes me want to cry Pin
Daniel Pfeffer12-Apr-21 20:33
professionalDaniel Pfeffer12-Apr-21 20:33 
GeneralRe: This bug makes me want to cry Pin
honey the codewitch13-Apr-21 1:34
mvahoney the codewitch13-Apr-21 1:34 
GeneralRe: This bug makes me want to cry Pin
Fueled By Decaff12-Apr-21 5:22
Fueled By Decaff12-Apr-21 5:22 
GeneralRe: This bug makes me want to cry Pin
honey the codewitch12-Apr-21 5:25
mvahoney the codewitch12-Apr-21 5:25 
GeneralRe: This bug makes me want to cry Pin
Ron Nicholson12-Apr-21 5:25
professionalRon Nicholson12-Apr-21 5:25 
GeneralRe: This bug makes me want to cry Pin
Greg Utas12-Apr-21 5:28
professionalGreg Utas12-Apr-21 5:28 
GeneralRe: This bug makes me want to cry Pin
W Balboos, GHB12-Apr-21 5:38
W Balboos, GHB12-Apr-21 5:38 
GeneralRe: This bug makes me want to cry Pin
honey the codewitch12-Apr-21 5:50
mvahoney the codewitch12-Apr-21 5:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.