Is there a sample available to add an Annotation Rectangle on a JPG image by code?
GS
Dim oGdPictureImaging As New GdPictureImaging
Dim oAnnotationManager As New AnnotationManager
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("c:\test.jpg")
oAnnotationManager.InitFromGdPictureImage(ImageID)
Dim rectAnnot As AnnotationRectangle = oAnnotationManager.AddRectangleAnnot(Color.Red, Color.Transparent, 1, 1, 3, 3)
'todo: change annot property here, if any
'
'oAnnotationManager.BurnAnnotationsToPage(True) 'Uncomment to burn annots to page
oAnnotationManager.Close()
oGdPictureImaging.SaveAsJPEG(ImageID, "c:\testout.jpg")
oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Dim oGdPictureImaging As New GdPictureImaging
Dim oAnnotationManager As New AnnotationManager
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("c:\test.jpg")
oAnnotationManager.InitFromGdPictureImage(ImageID)
Dim rectAnnot As AnnotationRectangle = oAnnotationManager.AddRectangleAnnot(Color.Red, Color.Transparent, 1, 1, 3, 3)
GdViewer1.DisplayFromGdPictureImage(ImageId)
'todo: change annot property here, if any
'
'oAnnotationManager.BurnAnnotationsToPage(True) 'Uncomment to burn annots to page
oAnnotationManager.Close()
oGdPictureImaging.SaveAsJPEG(ImageID, "c:\testout.jpg")
oGdPictureImaging.ReleaseGdPictureImage(ImageID)oAnnotationManager.Close();/* or oAnnotationManager.SaveAnnotationsToPage();*/ GdViewer1.DisplayFromGdPictureImage();Return to GdPicture XMP Annotations Plugin
Users browsing this forum: No registered users and 1 guest