How to save a bitmap ?

F

Frank Trebus

I´ve created a Bitmap in C# during runtime from a lbl-Field:

Bitmap noise = new Bitmap(lblPaint.Width, lblPaint.Height,
PixelFormat.Format16bppRgb555);

System.Drawing.Bitmap flag = new System.Drawing.Bitmap(10, 10);
for( int x = 0; x < flag.Height; ++x )
{
for( int y = 0; y < flag.Width; ++y )
{
noise.SetPixel( x, y, flag.GetPixel(x,y));
}
}

How can I save this image to a file ? (Streams, Filewriter ?).

Thanks,
F.Trebus
--
MfG FT

Auf dieses Posting bitte nicht via E-Mail antworten !
Diese E-Mail-Adresse ist nur im Usenet gültig und wird nicht
abgerufen !
 
F

Frank Trebus

Justin said:
noise.Save(fileName, ImageFormat.Bmp);

OK. This works, but the image is always black.
I painted some structures in a lbl-Field. How can I now get the color
information from every pixel in this field ? Is there a method for
Label-Fields or do I have to use another control item ?

Thank you very much !
--
MfG FT

Auf dieses Posting bitte nicht via E-Mail antworten !
Diese E-Mail-Adresse ist nur im Usenet gültig und wird nicht
abgerufen !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top