How to translate colors from 32bits to 24bits??
Can someone tell me how to translate colors from 32bits to 24bits?
I had loaded a bmp file to a HDC was 32bits then I wanna to write it to a JPEG file.
but the source bmp was a 32bits , so can not write to JPEG 24bits colors.
Is there someone know how??
Thanks in advance..
Jason Hsu
Re: How to translate colors from 32bits to 24bits??
32 is basically 24 with an extra alpha channel
so if you had a 32bit value of
0xaarrggbb
just do (new_val = (old_val << 8);
thats it