I have to read a 24bpp Bitmap and convert each pixel from RGB24 to ARGB16.
I used the following code,
#define ARGB16(a, r, g, b) ( ((a) << 15) | (r)|((g)<<5)|((b)<<10))
But I am not getting the required Output.
Any help would be highly appreciated.
Break it up. Let’s continue to use macros:
This assumes the alpha is just a single bit.