VintaSoft Imaging .NET SDK 14.0: Documentation for .NET developer
Vintasoft.Imaging.Annotation.Wpf.UI Namespace / WpfAnnotationViewController Class / BurnAnnotationCollectionOnImage Methods / BurnAnnotationCollectionOnImage(VintasoftImage) Method
Syntax Example Requirements SeeAlso
In This Topic
    BurnAnnotationCollectionOnImage(VintasoftImage) Method (WpfAnnotationViewController)
    In This Topic
    Burns an annotation collection on image, disposes annotations of image and clears the annotation collection of image.
    Syntax
    'Declaration
    
    Public Overloads Sub BurnAnnotationCollectionOnImage( _
    ByVal image
    The image from Images.
    As Vintasoft.Imaging.VintasoftImage _
    )
    public void BurnAnnotationCollectionOnImage(
    Vintasoft.Imaging.VintasoftImage image
    )
    public: void BurnAnnotationCollectionOnImage(
    Vintasoft.Imaging.VintasoftImage* image
    )
    public:
    void BurnAnnotationCollectionOnImage(
    Vintasoft.Imaging.VintasoftImage^ image
    )

    Parameters

    image
    The image from Images.
    Example

    This C#/VB.NET code shows how to burn annotations on image.

    
    ' Create the image collection and add images to collection.
    Dim imageCollection As New Vintasoft.Imaging.ImageCollection()
    imageCollection.Add("D:\Images\AutoContrast.jpg")
    imageCollection.Add("D:\Images\AutoColors.jpg")
    
    ' Create annotation controllers associated with image collection.
    Dim annotationDataController As New Vintasoft.Imaging.Annotation.AnnotationDataController(imageCollection)
    Dim wpfAnnotationViewController As New Vintasoft.Imaging.Annotation.Wpf.UI.WpfAnnotationViewController(annotationDataController)
    
    ' Create a data of rectangle annotation.
    Dim rectangleAnnotationData As New Vintasoft.Imaging.Annotation.RectangleAnnotationData()
    rectangleAnnotationData.Location = New System.Drawing.PointF(340, 150)
    rectangleAnnotationData.Size = New System.Drawing.SizeF(220, 150)
    ' Create a view of rectangle annotation.
    Dim wpfRectangleAnnotationView As New Vintasoft.Imaging.Annotation.Wpf.UI.WpfRectangleAnnotationView(rectangleAnnotationData)
    ' Add the rectangle annotation to the annotation controller.
    wpfAnnotationViewController(0).Add(wpfRectangleAnnotationView)
    
    ' Burn annotation collection on the first image.
    wpfAnnotationViewController.BurnAnnotationCollectionOnImage(0)
    
    ' Save image collection to TIFF file.
    imageCollection.SaveSync("D:\ImageCollection.tif", True)
    
    
    
    // Create the image collection and add images to collection.
    Vintasoft.Imaging.ImageCollection imageCollection = 
        new Vintasoft.Imaging.ImageCollection();
    imageCollection.Add(@"D:\Images\AutoContrast.jpg");
    imageCollection.Add(@"D:\Images\AutoColors.jpg");
    
    // Create annotation controllers associated with image collection.
    Vintasoft.Imaging.Annotation.AnnotationDataController annotationDataController = 
        new Vintasoft.Imaging.Annotation.AnnotationDataController(imageCollection);
    Vintasoft.Imaging.Annotation.Wpf.UI.WpfAnnotationViewController wpfAnnotationViewController = 
        new Vintasoft.Imaging.Annotation.Wpf.UI.WpfAnnotationViewController(annotationDataController);
    
    // Create a data of rectangle annotation.
    Vintasoft.Imaging.Annotation.RectangleAnnotationData rectangleAnnotationData = 
        new Vintasoft.Imaging.Annotation.RectangleAnnotationData();
    rectangleAnnotationData.Location = new System.Drawing.PointF(340, 150);
    rectangleAnnotationData.Size = new System.Drawing.SizeF(220, 150);
    // Create a view of rectangle annotation.
    Vintasoft.Imaging.Annotation.Wpf.UI.WpfRectangleAnnotationView wpfRectangleAnnotationView = 
        new Vintasoft.Imaging.Annotation.Wpf.UI.WpfRectangleAnnotationView(rectangleAnnotationData);
    // Add the rectangle annotation to the annotation controller.
    wpfAnnotationViewController[0].Add(wpfRectangleAnnotationView);
    
    // Burn annotation collection on the first image.
    wpfAnnotationViewController.BurnAnnotationCollectionOnImage(0);
    
    // Save image collection to TIFF file.
    imageCollection.SaveSync(@"D:\ImageCollection.tif", true);
    
    

    Requirements

    Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also