ClearImage COM API
Save Method
CiImage Object : Save Method
Description
Save image to original file
Syntax
Visual Basic
Public Sub Save() 
Remarks

This method saves an image using FileName and Format properties.   Image compression of TIFF and PDF files is controlled by pComprBitonal and pComprColorExJpegQuality property controls compression when pComprColor=citcJPEG or file format is JPEG.

See Image file saving guidelines on Inlite's How-to Web Site

This method generates an error if object.Image.IsZone is true.

Example
Sub OpenSaveAppendImages(imageFile1 As String, imageFile2 As String, pdfFileOut As String)
  Dim Ci As New CiServer
  Dim Image As CiImage: Set Image = Ci.CreateImage
    ' Create PDF file with image from the first file
  Image.Open imageFile1, 1
  Image.SaveAs pdfFileOut, cifPDF
    ' Append to PDF file image from the second file
  Image.Open imageFile2, 1
  Image.Append pdfFileOut, cifPDF
    '  Open PDF and show image information
  Image.Open pdfFileOut, 2
  ShowImageInfo Image
    '  Close image
  Image.Close
End Sub

Sub ShowImageInfo(Image As CiImage)
  Debug.Print "  File='" & Image.fileName & "'" & " Page=" & Image.PageNumber & " PageCount=" & Image.PageCount & "  Format=" & Image.Format & vbCrLf
  Debug.Print "  Width=" & Image.Width & "  Height=" & Image.Height & "  BPP=" & Image.BitsPerPixel & " HorzDpi=" & Image.HorzDpi & "   VertDpi=" & Image.VertDpi & vbCrLf
End Sub
Sub ProcessMultiPageFile(imageFile As String)
  Dim Ci As New CiServer
  Dim Image As CiImage: Set Image = Ci.CreateImage
  Dim page As Integer, pageCount As Integer
  Image.Open imageFile
  pageCount = Image.pageCount
    ' for each page
  For page = 1 To pageCount
    Image.Open imageFile, page
        '  Process  image page, for example
        '  ==== Read barcodes
        '     Set BarcodePro.Image = Image
        '     BarcodePro.Find 0
        '     ' process barcodes
        '  ==== Repair image
        '     Set Repair.Image = Image
        '     Repair.AutoDeskew
        '     Image.Append sFileOut ' save
  Next
End Sub
See Also

CiImage Object  | CiImage Members  | Open  | Save  | SaveAs  | Append