Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
SQL
Convert bmp to 256 colors


(images) Convert 24 bit to 256 colors, not grayscale .

thanks.
Posted

I think the best way to do what you want is by converting the image to an image with palette. This of course means changing the bits from 24 to 1-8 bits.
I believe there are some links on the internet on how to do this. I did a quick search and found the following:
MSDN convert image
C# RGB to Palette Based 8-bit Greyscale Bitmap Class
Converting 24 bit image
I also found the following demo that lets you convert the bits of the image while keeping the image colored:
Silverlight image processing

Hope this helps
 
Share this answer
 
 
Share this answer
 
Comments
atllen 7-Dec-12 2:31am    
That code is not complete...
[no name] 7-Dec-12 2:33am    
its a article :)
atllen 7-Dec-12 2:39am    
Could you please give us a code with a demo??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900