Page 1 of 1

Save annotation image to JPEG

Posted: Wed Aug 25, 2010 7:49 pm
by pjcruz
Hi, How can I save the image with the annotations to JPEG format?

Re: Save annotation image to JPEG

Posted: Thu Aug 26, 2010 9:22 am
by Yuri
Here is an example that shows how to save image with annotations in JPEG format into memory stream:

Code: Select all

MemoryStream stream = new MemoryStream();
JpegEncoder jpegEncoder = new JpegEncoder();
vsImage.SaveAnnotations = true;
vsImage.Save(stream, jpegEncoder);

Re: Save annotation image to JPEG

Posted: Thu Aug 26, 2010 5:09 pm
by pjcruz
Yuri wrote:Here is an example that shows how to save image with annotations in JPEG format into memory stream:

Code: Select all

MemoryStream stream = new MemoryStream();
JpegEncoder jpegEncoder = new JpegEncoder();
vsImage.SaveAnnotations = true;
vsImage.Save(stream, jpegEncoder);


Thanks for your reply, what exactly is the vsImage object that you are mentioning?

Re: Save annotation image to JPEG

Posted: Thu Aug 26, 2010 11:27 pm
by pjcruz
I already figure it out i just did :

Code: Select all

Dim jpegEncoder As New JpegEncoder
annotationViewer1.Images.SetSaveAnnotations(True)
annotationViewer1.Image.Save("C:\folder\tmp.jpeg", jpegEncoder)
Thanks for your help