By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,084 Members | 1,266 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,084 IT Pros & Developers. It's quick & easy.

save a high color Image as 256 color or fewer.

P: n/a
Hello.
How I can write a program that save a high color image
as 256 color or fewer with .BMP format , just like
Microsoft Paint.
I want to write this Program with C# .NET , NOT with MFC .
Thank you.
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Mohammad" <my**********@yahoo.com> wrote in message
news:07****************************@phx.gbl...
Hello.
How I can write a program that save a high color image
as 256 color or fewer with .BMP format , just like
Microsoft Paint.
I want to write this Program with C# .NET , NOT with MFC .
Thank you.


Use GDI+ and unsafe code. Take a look at this link. There's an example that
converts to black and white which would be quite similar to what you want:

http://www.codeproject.com/cs/media/...cfilters11.asp

--
Mike Mayer
http://www.mag37.com/csharp/
mi**@mag37.com
Nov 15 '05 #2

P: n/a
Not a bad link! Though it's missing the palette generation and dithering
aspects that you'll need to get good images. You need a palette for 256
color and below, there are many different ways to create one like median
cut or using a "standard" palette...

Dithereing is a method of spreading the difference (error) from the actual
pixel value and the closest palette color to surrounding pixels. This has
the effect of reducing banding
"Michael Mayer" <mi**@mag37.com> wrote in news:OQ54rHZgDHA.1760
@TK2MSFTNGP09.phx.gbl:
http://www.codeproject.com/cs/media/...cfilters11.asp

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.