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
'Static' Annotations
Re: 'Static' Annotations
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
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
Re: 'Static' Annotations
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,
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,
Re: 'Static' Annotations
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
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
Who is online
Users browsing this forum: No registered users and 1 guest