'Static' Annotations

Discussions about annotation support.
Post Reply
Ibbe
Posts: 3
Joined: Tue May 17, 2011 11:57 am

'Static' Annotations

Post by Ibbe » Tue Jun 28, 2011 3:23 pm

Hi,

Is it possible to add static annototations?
For example add a rubber stamp or transparent rectangle on an image using coordinates an specifying the width and height.

Kind Regards
Ibbe

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: 'Static' Annotations

Post by Loïc » Tue Jun 28, 2011 3:41 pm

Hi,

This is not yet implemented but will be really soon in a medium release.
Currently we support only user interactive adding mode.

Kind regards,

Loïc

Shane
Posts: 2
Joined: Fri Nov 04, 2011 7:18 pm

Re: 'Static' Annotations

Post by Shane » Fri Nov 04, 2011 7:29 pm

I've downloaded GDPicture 8.4 and I'm trying to add static image annotations to a page. I can get one to work, but how do I add more than one image annotation on the same page. Let's say on a menu I have 3 options and each option will add a static image annotation on the same TIFF page, I can only get it to work with one static annotation on a TIFF page, How do I get add more static annotations to a TIFF page everytime I select a menu option. In the example below it seems that everytime I pass the .InitFromGDPictureImage(ImageID) from another menu method the current annotation disappears.

Example:

private void annotCutoffToolStripMenuItem_Click(object sender, EventArgs e)
{
GdPictureImaging oGdPictureImaging = new GdPictureImaging();

int ImageID = oGdPictureImaging.CreateGdPictureImageFromFile(Path.GetDirectoryName(Application.ExecutablePath).Replace("bin\\Debug", "") + "TEMPLATE_orig.tif");
//int ImageID = oGdPictureImaging.CreateGdPictureImageFromHwnd(GdViewer1.Handle);

/AnnotationManager oAnnotationManager = new AnnotationManager();
oAnnotationManager.InitFromGdPictureImage(ImageID );
oAnnotationManager.SelectPage(1);

string FilePath = Path.GetDirectoryName(Application.ExecutablePath).Replace("bin\\Debug", "") + "media\\cutoff.jpg";

Bitmap Bm;
int jpgImageID = oGdPictureImaging.CreateGdPictureImageFromFile(FilePath);

float left_pix = (float)(300 / oGdPictureImaging.GetVerticalResolution(ImageID ));
float top_pix = (float)(400 / oGdPictureImaging.GetVerticalResolution(ImageID ));
float width_pix = (float)(245 / oGdPictureImaging.GetVerticalResolution(ImageID ));
float height_pix = (float)(178 / oGdPictureImaging.GetVerticalResolution(ImageID ));

Bm = oGdPictureImaging.GetBitmapFromGdPictureImage(jpgImageID);
AnnotationEmbeddedImage annot1 = oAnnotationManager.AddEmbeddedImageAnnot(Bm, left_pix, top_pix, width_pix, height_pix);
annot1.CanResize = false;

oAnnotationManager.Close();
GdViewer1.DisplayFromGdPictureImage(ImageID );
}


any help would be appreciated.
Thanks,

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: 'Static' Annotations

Post by Loïc » Mon Nov 07, 2011 3:55 pm

Hi,

What I can see in your code is you are loading an image from file and draw an annotation on it.
But you never save it. So it is probably your problem.

Hope this helps.

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest