Description
Append image to file
Syntax
Parameters
Remarks
Example
VB Example (Visual Basic) | Copy Code |
---|
Public Sub T_ImageFile(ByRef Img As CiImage, sFileName)
Dim ImgZone As CiImage
Dim sMulti: sMulti = "c:\tMulti.tif"
Dim sZone: sZone = "c:\tZone.tif"
Dim sSingle: sSingle = "c:\tSingle.tif"
' Open test
Img.Open sFileName
T_ImageInfo Img
' Save multi-page TIFF
DeleteFile sMulti
Set ImgZone = Img.CreateZone(Img.Width / 3, Img.Height / 3, _
Img.Width * 2 / 3, Img.Height * 2 / 3)
Img.Append sMulti
T_ImageInfo Img
ImgZone.Invert:
T_ImageInfo Img
ImgZone.Append sMulti
T_ImageInfo Img
Img.Append sMulti
Img.Invert
Img.Append sMulti
ImgZone.Append sMulti
T_ImageInfo Img
' Open page
Img.Open sMulti, 3
Img.Invert
T_ImageInfo Img
' Save test. Save modified page to multi-page TIFF
Img.Save
T_ImageInfo Img
' Save as Zone Test
Img.Invert
ImgZone.SaveAs sZone
T_ImageInfo Img
' Save as Test
Img.SaveAs sSingle
T_ImageInfo Img
End Sub
Public Sub T_ImageInfo(ByRef Img As CiImage)
Debug.Print "Image #" & Img.Handle & " File='" & Img.FileName & "'" & _
" Width=" & Img.Width & " Height=" & Img.Height
Debug.Print " HorzDpi=" & Img.HorzDpi & "dpi VertDpi=" & Img.VertDpi & "dpi" & _
" Page=" & Img.PageNumber & " Page Count =" & Img.PageCount & _
" Format:=" & Img.Format & _
IIf(Img.IsModified, " MODIFIED", "")
End Sub |
Process Multi-page file (Visual Basic) | Copy Code |
---|
Public Sub T_MultiPageFile(ByRef Img As CiImage, sFileName As String)
Dim nPage, nPageCount
Img.Open sFileName
nPageCount = Img.PageCount
' for each page
For nPage = 1 To nPageCount
Img.Open sFileName, nPage
' Process image page
' ==== Read barcodes
' Set BarcodePro.Image = Img
' BarcodePro.Find 0
' ' process barcodes
' ==== Repair image
' Set Repair.Image = Img
' Repair.AutoDeskew
' Img.Append sFileOut ' save
Next
End Sub |
See Also