I have a Bitmap with 24 bit format that contains a few colors and i want to convert it to a paletted Bitmap with 256 or less colors.
I want to use the colors found in the 24 bit bitmap.
Then the problem is to find a palette from the bitmap.
Please if there is an effective way to do so, advice me.
The data acquired by CCD Camera are in 16 bpp(12 bits left plus 4 bits 0 right). To ensure, no information lost, it will be good if I can show and save it in 16 bpp(in RGB555). I think a function like this will be useful:
VOID WINAPI Cvt16To16bpp(LPWORD lpSrc, LPBYTE lpDst, DWORD dwPixCount)
mov ecx, dwPixCount
mov esi, lpSrc
mov edi, lpDst
Can someone tell me if I am doing correctly?! Thanks in advance.
Hi, can someone please explain me how to save a bitmap that was returned as HANDLE in the file. A short (if it can be short) sample code would do. Or at least point me to some good reference where I could find out how to do this.
I want to know about color table.1 bit image has 2 colors.
2 bit image has 4 colors,4 bit image has 16 and 8 bit image
has 256 colors.24 bit image has no color table.
What about 16 and 32 bit images.Do they have color table?
In "SAVEBMP.C" in msdn I found this statement about 16 and 32
Can you please explain this to me?
I missed the earlier post when I posted this the first time; please see "Fix: 32-bit color images" for the reason for this problem (it's to do with 1 being assigned to nColors for 32-bit images; <<32 is a noop on a 32-bit value).
I created a CBitmap object with following code
unsigned char *bmp = new unsigned char;
for(int nI=0; nI<10000; nI++)
bmp[nI] = nI % 256;
Then called the DDB to DIB,but GetDIBits always return 0.
Please Help me!!!