ClearImage COM Server
Append Method
See Also  Example  Send Feedback
FileName
Format
Only formats starting with ciTIFF or cifPDF are valid.  Default values are ciTIFF_G4 for Bi-tonal images and ciTIFF_LZW  for Color and Grayscale images.
CiImage Object : Append Method

Description

Append image to file

Syntax

Visual Basic
Public Sub Append( _
   ByVal FileName As String, _
   Optional ByVal Format As EFileFormat = ciTIFF_G4 _
) 

Parameters

FileName
Format
ValueDescription
ciBMPBMP format. bpp= 1, 8, 24
ciEXTFormat is based on file name extension
cifICLImage Cash Letter format. bpp=1,8,24
cifPDFPDF Format. bpp=1,8,24
ciGIFGIF format. bpp= 1, 8, 24. Read only
ciICOWindows icon format, 255x255 max. bpp=8, 24
ciJBGJBIG format. bpp=1. Read only
ciJP2JPEG-2000 format. bpp=8, 24
ciJPCJPEG 2000 Code stream. bpp=8
ciJPGJPEG format. bpp=8, 24
ciPCXPCX format. bpp= 1, 8, 24
ciPGXJPEG-2000 verification model. bpp=8
ciPNGPortable Network Graphic format. bpp= 1, 8, 24
ciPNMPortable aNyMap format. bpp=8
ciTGATarga format. bpp=8, 24
ciTIFFUncompressed TIFF format. bpp= 1, 8, 24
ciTIFF_G3_1DTIFF Group3 compression, bpp=1
ciTIFF_G4TIFF Group 4 compression, bpp=1
ciTIFF_JPEGTIFF JPEG compression, bpp=8, 24
ciTIFF_LZW 
ciTIFF_NEOLTIFF No-end-of-line compression, bpp=1
ciWBMPWireless Bitmap format, 255x255 max. bpp=1
Only formats starting with ciTIFF or cifPDF are valid.  Default values are ciTIFF_G4 for Bi-tonal images and ciTIFF_LZW  for Color and Grayscale images.

Remarks

File is created if it does not exist. Existing file should be in TIFF format.

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

© 1992-2011. Inlite Research, Inc. All Rights Reserved.