ImageGear21.Art Assembly > ImageGear.ART Namespace > ImGearART Class > SavePage Method : SavePage(ImGearARTPage,ImGearPage) Method |
'Declaration Public Overloads Shared Sub SavePage( _ ByVal artPage As ImGearARTPage, _ ByVal page As ImGearPage _ )
'Usage Dim artPage As ImGearARTPage Dim page As ImGearPage ImGearART.SavePage(artPage, page)
public static void SavePage( ImGearARTPage artPage, ImGearPage page )
public: static void SavePage( ImGearARTPage* artPage, ImGearPage* page )
public: static void SavePage( ImGearARTPage^ artPage, ImGearPage^ page )
// Save reference to the original metadata. ImGearMetadataTree igMetadataTreeOriginal = (ImGearMetadataTree)igPage.Metadata.Child; // Prepare a TIF metadata tree. ImGearMetadataTree igMetaDataTreeTIF = (igPage.Metadata.Child.Format == ImGearMetadataFormats.TIF) ? (ImGearMetadataTree)igPage.Metadata.Child.Clone() : new ImGearMetadataTree(ImGearMetadataFormats.TIF, (Int32)ImGearTIFTagIDs.FORMAT); // Replace page metadata with igMetaDataTreeTIF. igPage.Metadata.Child = igMetaDataTreeTIF; // Save the art data into the metadata of the image. ImGearART.SavePage(igARTPage, igPage); // Save an image containing embedded ART 2.0 annotations into a ImGearPage object using (FileStream localFile = new FileStream("test_art_save.tif", FileMode.Create)) ImGearFileFormats.SavePage(igPage, localFile, 0, ImGearSavingModes.OVERWRITE, ImGearSavingFormats.TIF_UNCOMP, null); // Restore original meta data. igPage.Metadata.Child = igMetadataTreeOriginal;
' Save reference to the original metadata. Dim igMetadataTreeOriginal As ImGearMetadataTree = DirectCast(igPage.Metadata.Child, ImGearMetadataTree) ' Prepare a TIF metadata tree. Dim igMetaDataTreeTIF As ImGearMetadataTree If (igPage.Metadata.Child.Format = ImGearMetadataFormats.TIF) Then igMetaDataTreeTIF = DirectCast(igPage.Metadata.Child.Clone(), ImGearMetadataTree) Else igMetaDataTreeTIF = New ImGearMetadataTree(ImGearMetadataFormats.TIF, DirectCast(ImGearTIFTagIDs.FORMAT, Int32)) End If ' Replace page metadata with igMetaDataTreeTIF. igPage.Metadata.Child = igMetaDataTreeTIF ' Save the art data into the metadata of the image. ImGearART.SavePage(igARTPage, igPage) ' Save an image containing embedded ART 2.0 annotations into a ImGearPage object Using localFile As New FileStream("test_art_save.tif", FileMode.Create) ImGearFileFormats.SavePage(igPage, localFile, 0, _ ImGearSavingModes.OVERWRITE, ImGearSavingFormats.TIF_UNCOMP, Nothing) End Using ' Restore original meta data. igPage.Metadata.Child = igMetadataTreeOriginal