what i want to achieve is
-manipulate image and also annotations (rotate, crop, apply image command ie. AutoDeskew, AutoPunchHoleRemoval, AutomaticBorderRemoval etc.)
-save image and annotationXMP to file
-open image and annotations again expecting the right position and angle of annotations
I'm currently be able to manipulate image but annotations ..... (I'm having headache right now...)
Is it possible for me to accomplish this scenario without burning annotation to the image itself ?
I see that there's RotateAnnotations() (which i haven't try it yet) but with other various commands it's seems unlikely possible.
do you have any advice ?
GdPictureImaging gdImaging = new GdPictureImaging();
imageId = gdImaging.CreateGdPictureImageFromFile(FilePath);
GdViewer1.AddRectangleAnnotInteractive(xxxxxx); before deskew.png
GdViewer1.Redraw(); after deskew.png As you can see in attachments the deskew command work but only with the image not annotation
What i want is to rotate the annotation together with the image while applying deskew command WITHOUT burning annotation to the image and also save the rotated annotation to xmp.
This is absolutely normal. The AutoDeskew is something you apply to the image, it has nothing to do with the annotations layer.
For you to rotate the annotation the same as the deskewed angle, you should discover the angle of the skew with:
http://guides.gdpicture.com/content/web ... ngle).html
and then use RotateAnnotations with the same angle discovered as above, as well as the image with GdPictureImaging.RotateAngle()
I hope this helps.
Thanks for the answer but I've to say sorry since it's wasn't be much help, I've got skew angle from GetSkewAngle but the problem is RotateAnnotations() only support 90,180,270 degree rotate.
http://guides.gdpicture.com/content/web ... tions.html
And also getskewangle can check only in case of Autodeskew but there's others commands as RemoveHolePunch, CropBorders etc.
Ok two things:
1. For the rotation, you need to set the rotation property of each annotation, here is how:
Get the Annotation Manager of the GdViewer:
http://guides.gdpicture.com/content/web ... iewer.html
Get the Idx of Each Annotation by looping through the annotations to their count
For each Id, set the property Rotation by using http://guides.gdpicture.com/content/GdP ... Value.html
2. For the AutoCrop HolePunch etc. You have to understand that those are operations on the image. The Annotation layer has nothing to do with that. For example, it makes no sense to Holepunch an annotation.
Who is online
Users browsing this forum: No registered users and 1 guest