Draw on a picture and save the result

G

Guest

Can anyoe please help me. I want to draw on a predefined picture, and save
the picture as a new file. (BMP or JPG). The application I am running is WM5
PPC.

Erik
 
F

Fabien

Hi,

You can use the method Save from Bitmap, with the following
parameter :
yourImage.Save(yourFileName, CodecInfo, encoderParameters);

ImageCodecInfo CodecInfo = GetEncoderInfo("image/jpeg"); // codec for
jpeg format
EncoderParameters encoderParameters = new EncoderParameters(1);
encoderParameters.Param[0] = new
EncoderParameterSystem.Drawing.Imaging.Encoder.Quality, 80L); //
compression quality


BR

Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/
 
E

Erik

Thanks for the help, but still stuck.

What i want is to be able to draw som lines on the screen and then save as
a bmp file.

Does anyone have a sample?

-Slow Learner.
 
F

Fabien

Hi,

Draw your lines on a background panel, then call the method
DrawToBitmap from your panel. You will obtain a Bitmap, then you could
save your Bitmap in a file.

Fabien Decret
Windows Embedded Consultant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/



I am able to draw the lines - but i cant save the image.

Erik

"<ctacke/>" <ctacke[@]opennetcf[dot]com> skrev i melding

What part isn't working? Are you able to draw the lines?
--
Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--

- Afficher le texte des messages précédents -
 

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