473,387 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

save a high color Image as 256 color or fewer.

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
2 3158
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Shahar Golan | last post by:
In my site I show low quality pictures. When someone right clicks an image and selects 'Save Picture As...', I wish to let him save the high quality picture. I 10Q 4NE IDa.
5
by: George | last post by:
This program need to draw the some triangles into a 512 × 512 buffer (in memory). Or save it to a file. #include "project3.h" Image::Image(int xres, int yres): xres(xres), yres(yres) {...
2
by: Ben Amada | last post by:
Hi group. I'm going to display a low resolution image in an HTML page. On the web server, I have a high resolution version of that image. If I display the high resolution image in the browser...
9
by: Mark Johnson | last post by:
How can you save all or a portion of the Grafics object to a Image/Bitmap ? I am try to save the Images from Cards.dll to a BitMap file. I can read in the Images to the Grafics, but when I try this...
9
by: Ivan Demkovitch | last post by:
Hi! I would like to know if I can save File on Server using server-side code? For example, I like to create thumbnail images and populate specific directory. Do I need specific permissions...
1
by: Hardy Wang | last post by:
Hi, I found a piece of code to add drop shadow to a photo like below, after I save the image, it is actually a BMP file even though I specify a JPG file extension (see...
15
by: dgk | last post by:
I'm trying to save the image of a webbrowser control. Not a particular image being shown on the page, but rather the visible display of the webbrowser. Using VS2005 I figured that maybe...
1
by: Daniel Mark | last post by:
hello all: I am using Image module from PIL to save created image as JPG format. Is there any option I could set for function Image.save so that the stored image will have the highest quality....
8
by: MartinRinehart | last post by:
I'm making a slider widget with a <canvas>. First I draw the background. I'd like to save this drawing. Something like: slider.drawBackground(); slider.back = new ScreenArea( left, top, width,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.