Editing the Image of a ReferencedImageAnnotation

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Moderator: Alex

Post Reply
ltiong
Posts: 14
Joined: Fri Apr 24, 2009 1:45 am

Editing the Image of a ReferencedImageAnnotation

Post by ltiong » Thu Jun 11, 2009 12:55 am

I'd like to:
1) create a ReferencedImageAnnotation
2) modify the Referenced image
3) and Save over the original linked file.

This worked for me previously in version 2.2 (build 2217), but it stopped working when i moved to version 2.2 (build 2223). It appears that the ReferencedImageAnnotation now locks the files that it links, preventing me from changing the original file with code or w/ an external application.

Was this intentional, or is there another way to accomplish this?



Code sample:

Code: Select all

// Given a ReferencedImageAnnotation
ReferencedImageAnnotation ria = new ReferencedImageAnnotation();
ria.Filename = "C:/mypicture.jpg";
...

// Edit the Image - create a Form to edit the Image. 
PictureEditDialog editDialog = new Anno_PictureEdit(ria.Image);

if (editDialog.ShowDialog(this) == DialogResult.OK){
     //save the Image back to disk
     Image modifiedImage = editDialog.Image;
     modifiedImage.Save(ria.Filename);

     ria.Filename = fileName;   //this refreshes the Annotation on the AnnotationViewer.
}

Thanks,
Lu

Alex
Site Admin
Posts: 1445
Joined: Thu Jul 10, 2008 2:21 pm

Re: Editing the Image of a ReferencedImageAnnotation

Post by Alex » Thu Jun 11, 2009 3:58 pm

Thank you for the information. We will fix this problem in version 3.0.

Best regards, Alexander

ltiong
Posts: 14
Joined: Fri Apr 24, 2009 1:45 am

Re: Editing the Image of a ReferencedImageAnnotation

Post by ltiong » Fri Jun 12, 2009 8:04 pm

Awesome, thanks Alex.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest