BITiff OCX Methods

This section covers the Methods of the BITiff Ocx Custom Control.

AddNumericTag  Method

Description         Adds or replaces one byte, short or long type tiff tag to an image of a tiff file.

Syntax                 RetVal = [BITIFF.]AddNumericTag FileName Image TagID Type Data

Returns               RetVal                    Boolean           Returns true on success, otherwise false.

Remarks             FileName                String              The name of the tiff file.

                            Image                     Integer             The number of the image to add the tag to.

                                                                                    The first image is 0.

                            TagID                     Integer             The ID of the tag to add. Predefined tags cannot be modified. If you try to do this, the method returns false.

                            Type                       Integer             The type of the tag to add. This can be:

tifttByte = 1

tifttShort = 3

tifttLong = 4

                            Data                        Long                The data to store in the tag. This long value can contain a byte, an integer or a long data for the method.

See Also              AddNumericTagBuffer Method, GetNumericTag Method, DeleteTag Method

 

AddNumericTagBuffer  Method

Description         Adds or replaces one byte, short, long or rational type tiff tag to an image of a tiff file. Supports multiple data items.

Syntax                 RetVal = [BITIFF.]AddNumericTagBuffer FileName Image TagID Type Data Count

Returns               RetVal                    Boolean           Returns true on success, otherwise false.

Remarks             FileName                Stirng              The name of the tiff file.

                            Image                     Integer             The number of the image to add the tag to.
The first image is 0.

                            TagID                     Integer             The ID of the tag to add. Predefined tags cannot be modified. If you try to do this, the method returns false.

                            Type                       Integer             The type of the tag to add. This can be:

tifttByte = 1

tifttShort = 3

tifttLong = 4

tifttRational = 5

                            Data                        Long                The data to store in the tag. This long value can contain a byte, an integer or a long data or one half of a rational value for the method. You should pass the first item of an array which contains the data to this method.

                            Count                     Long                The number of data items stored in the array. If you wish to add rational values, this number must be the half of the long values in the array.

See Also              AddNumericTag Method, GetNumericTagBuffer Method, DeleteTag Method

 

AddNumericTagValue  Method

Description         Adds or replaces one byte, short, long or rational type tiff tag to an image of a tiff file. Supports multiple data items, but you must call before the CreateTagArray method to allocate a memmory buffer, and after the DestroyTagArray method to destroy it. You can give one value by one call to the alloceted buffer length.

Syntax                 RetVal = [BITIFF.]AddNumericTagValue FileName Image TagID Type Data

Returns               RetVal                    Boolean           Returns true on success, otherwise false.

Remarks             FileName                Stirng              The name of the tiff file.

                            Image                     Integer             The number of the image to add the tag to.
The first image is 0.

                            TagID                     Integer             The ID of the tag to add. Predefined tags cannot be modified. If you try to do this, the method returns false.

                            Type                       Integer             The type of the tag to add. This can be:

tifttByte = 1

tifttShort = 3

tifttLong = 4

tifttRational = 5

                            Data                        Long                The data to store in the tag. This long value can contain a byte, an integer or a long data or one half of a rational value for the method. You should pass the first item of an array which contains the data to this method.

See Also              AddNumericTag Method, GetNumericTagBuffer Method, DeleteTag Method, CreateTagArray, DestroyTagArray

 

AddStringTag  Method

Description         Adds or replaces one ASCII type tiff tag to an image of a tiff file.

Syntax                 RetVal = [BITIFF.]AddStringTag FileName Image TagID Data

Returns               RetVal                    Boolean           Returns true on success, otherwise false.

Remarks             FileName                Stirng              The name of the tiff file.

                            Image                     Integer             The number of the image to add the tag to.
The first image is 0.

                            TagID                     Integer             The ID of the tag to add. Predefined tags cannot be modified. If you try to do this, the method returns false.

                            Data                        String              The data to store in the tag.

See Also              AddNumericTag Method, AddNumericTagBuffer Method,
GetStringTag Method, DeleteTag Method

 

BiTiffGetLastError  Method

Description         Returns the last error code.

Syntax                 Error = [BITIFF.]BiTiffGetlastError

Remarks             Error                      Short               The code of last error occurred.

 

See Also              GetErrorString Method

 

CloseCopyHandle Method

Description         Closes a file handle opened for copying TIFF images. This function can be used only in pair with the OpenForCopy method.

Syntax                 RetVal = [BITIFF.]CloseCopyHandle Handle

Returns               RetVal                    Boolean           True on success, False otherwise.

Remarks             Handle                    LONGLONG The handle of a file. This handle can be taken from the OpenForCopy method.

See Also              OpenForCopy Method, CopyTiffImage Method

 

CopyTiffImage  Method

Description         Copies an image from a tiff file to another tiff file. This method does not require any checking on the images to reach better performance.

Syntax                 RetVal = [BITIFF.]CopyTiffImage  FromHandle Image ToHandle

Returns               RetVal                    Boolean           True on success, False otherwise.

Remarks             FromHandle          LONGLONG The handle of the source file. This handle can be taken from the OpenForCopy method, with tifomRead (=0) mode.

                            Image                     Long                The position of the image to copy. The first image is 0.

                            ToHandle               LONGLONG The handle of the destination file. This handle can be taken from the OpenForCopy method, with tifomAppend (=2) or tifomCreate (=3) mode.

See Also              OpenForCopy Method, CloseCopyHandle Method

Code Example   to split a large, multipage tiff file into single page tiff files.

Dim Count As Integer

Dim Images As Integer

Dim Buffer As String

Dim FileFrom As Long

Dim FileTo As Long

 

Images = Tiff1.ImageCount("d:\multipage.tif")

FileFrom = Tiff1.OpenForCopy("d:\multipage.tif", tifomRead)

For Count = 0 To Images - 1

Buffer = "d:\singlepage" + Str(Count) + ".tif"

FileTo = Tiff1.OpenForCopy(Buffer, tifomCreate)

Call Tiff1.CopyTiffImage(FileFrom, Count, FileTo)

Tiff1.CloseCopyHandle (FileTo)

Next Count

Tiff1.CloseCopyHandle (FileFrom)

 

CopyTiffImageInFile  Method

Description         Copies one image of a tiff file to another tiff file. For large multipage tiff files use the CopyTiffImage method instead.

Syntax                 RetVal = [BITIFF.]CopyTiffImageInFile  SourceFile Image DestinationFile Mode

Returns               RetVal                    Boolean           Returns true on success, otherwise false.

Remarks             SourceFile              Stirng              The name of the tiff file which contains the image to be copied.

                            Image                     Integer             The position of the image to copy. The first image is 0.

                            DestinationFile      String              The name of the tiff file to create, overwrite or append with the selected image.

                            Mode                      Integer             The mode of the coping procedure:

                                                                  tifomAppend= 2  Appends to an existing file or creates a new one, if the specified file does not exist.

                                                                  tifomCreate= 3    Create a new file, or overwrite an existing one.

See Also              SetByteOrder Method

 

ConvertTiffToCiscoFormat Method

Description         Converts the existing TIFF file into CISCO TIFF format. The FileName has to exist. The image can be a single or multipage TIFF file. In the TIFF CISCO format the tags are in the beginning of the file.

Syntax                 RetVal = [BITIFF.] ConvertTiffToCiscoFormat FileName

Returns               RetVal                    Boolean           True on success, otherwise False.

Remarks             FileName                String              The destination file name.

See Also              SaveTiffForCiscoFormat Method

 

CreateDIBFaxPageFromASCII  Method

Description         Loads the specified ASCII file into a DIB.

Syntax                 Dib = [BITIFF.]CreateDIBFaxPageFromASCII  MaxPages PagesArray FileName PageWidth PageLength Xmargin Ymargin TypeFace FontPointSize XDPI YDPI LineSpace TabArray Flags

Remarks             Dib                          LONGLONG The device independent bitmap. 0 if error occurred.

                            MaxPages              Integer             The maximum number of pages (DIBs) to convert.

                            PagesArray            Long                The first item of an array to receive the pages (DIBs). The array must be large enough to store at least MaxPages values.

                            FileName                String              Name of an ASCII text file. The file must not be longer than 65535 bytes.

                            PageWidth             Integer             The page width is defined in 100 of an inch.
8 1/2 inch page should be 850.

                            PageLength           Integer             The page length is defined in 100 of an inch.
11 inch page should be 1100.

                            Xmargin                 Integer             The left and right margin on a page is defined in 100 of an inch. A 1/2 inch margin should be 50. On an 8 1/2 page a half inch margin should leave a 7 1/2 inch client area. Range must be in the page size limits.

                            Ymargin                 Integer             The top and bottom margin is defined in 100 of an inch. A 1/2 inch margin should be 50. On an 11 inch page a half inch margin should leave a 10 inch client area. Range must be in the page size limits.

                            TypeFace               String              The type face string.

                            FontPointSize        Integer             The font size in points. The range should be 6 to 72 points.

                            XDPI                      Integer             Horizontal DPI resolution of bitmap. Range should be 50 - 600 DPI.

                            YDPI                      Integer             Vertical DPI resolution of bitmap. Range should be 50 - 600 DPI.

                            LineSpace              Integer             Distance between two lines.

                            TabArray              Integer             The tab stops. Maximum of 15. You should pass the first item of an array to this parameter. The first zero value in the array indicates that there are no more tabs.

                            Flags                       Long                This can be any combination of the following values, except the tifafMeasureInch and tifafMeasureMeter flags:

tifafTextBold = 4             The entire text is bold.

tifafTextItalic = 2            The entire text is italic.

tifafMeasureInch = 1      The measurement is in inch (default).

tifafMeasureMeter = 8    The measurement is in millimeter.

See Also              DIBFormOverlay Method

 

CreateDIBFaxPageFromASCIIEXT  Method

Description         Loads the specified ASCII file into a DIB. The method create an array of DIBs that stores the pages of ASCII file. This array stores MaxPages DIBs. This array is allocated before the loading the ASCII file. This method should be used in ASP, C# and J# application for loading ASCII file instead of CreateDIBFaxpageFromASCII method.

Syntax                 Dib = [BITIFF.]CreateDIBFaxPageFromASCIIEXT  MaxPages FileName PageWidth PageLength Xmargin Ymargin TypeFace FontPointSize XDPI YDPI LineSpace Flags

Remarks             Dib                          LONGLONG The device independent bitmap. 0 if error occurred.

                            MaxPages              Integer             The maximum number of pages (DIBs) to convert.

                            FileName                String              Name of an ASCII text file. The file must not be longer than 65535 bytes.

                            PageWidth             Integer             The page width is defined in hundredths of an inch. 8 1/2 inch page should be 850.

                            PageLength           Integer             The page length is defined in hundredths of an inch. 11 inch page should be 1100.

                            Xmargin                 Integer             The left and right margin on a page is defined in hundredths of an inch. A 1/2 inch margin should be 50. On an 8 1/2 page a half inch margin should leave a 7 1/2 inch client area. Range must be in the page size limits.

                            Ymargin                 Integer             The top and bottom margin is defined in hundredths of an inch. A 1/2 inch margin should be 50. On an 11 inch page a half inch margin should leave a 10 inch client area. Range must be in the page size limits.

                            TypeFace               String              The type face string.

                            FontPointSize        Integer             The font size in points. The range should be 6 to 72 points.

                            XDPI                      Integer             Horizontal DPI resolution of bitmap. Range should be 50 - 600 DPI.

                            YDPI                      Integer             Vertical DPI resolution of bitmap. Range should be 50 - 600 DPI.

                            LineSpace              Integer             Distance between two lines.

                            Flags                       Long                This can be any combination of the following values, except the tifafMeasureInch and tifafMeasureMeter flags:

tifafTextBold = 4          The entire text is bold.

tifafTextItalic = 2         The entire text is italic.

tifafMeasureInch = 1   The measurement is in inch (default).

tifafMeasureMeter = 8 The measurement is in millimeter.

See Also              DIBFormOverlay Method CreateDIBFaxPageFromASCII Method GetSizeOfASCIIPagesArray Method FreeASCIIPagesArray Method GetDIBFromPagesArray Method GetTabStopInASCIIFile Method SetTabStopInASCIIFile Method

 

CreateTagArray  Method

Description     This method  a new array to store the tag values, if you call the addNumericTagValue method.

Syntax                 void CreateTagArray         Length

Remarks             Lenght                    Long                The array length.

                                         

See Also              addNumericTagValue

 

DestroyTagArray  Method

Description     . This method frees up the allocated memory area by the CreateTagArray method.

Syntax                 void DestroyTagArray       void

Remarks         Nothing

See Also              CreateTagArray

 

CutTiffFile  Method

Description         The method will cut (remove) the first nImage images from the szSourceFileName multipage TIFF File. The nImage is a zero based short. If nImage is less than 1 or greater than number of images, the method does nothing and returns immediately with FALSE.

Syntax                 RetVal = [BITIFF.]CutTiffFile szSourceFileName szPrefixFileName nImage

Returns               RetVal                    BOOL             TRUE on success, otherwise FALSE.

Remarks             szSourceFileName STRING         The source TIFF File. It must be a multipage TIFF File.

                            SzPrefixFileName STRING         The path and prefix for the destination TIFF File. The CutTiffFile will append 0001 for the first image 0002 for the second image and so on.

                            nImage                   Short               The number of images t be cut from the beginning of the TIFF File.

See Also              SplitTiffFile Method, MergeTiffFiles Method, CutProgress Event

 

DecodeCcittImageFrom  Method

Description         Loads the specified CCITT image file.

Syntax                 Dib = [BITIFF.]DecodeCcittImageFrom  FileName Compression Offset Width Height FillOrder ByteOrder

Remarks             Dib                          LONGLONG The device independent bitmap. 0 if error occurred.

                            FileName                String              The file name of a CCITT format file.

                            Compression          Integer             The compression mode of the image. This can be one of the following:

                                                                  tifCcittNoComp = 0     No compression (Raw image).

                                                                  tifCcittG31dNoEol = 1 Group 3        1Dimension with NoEnd Of Line (Group 2).

                                                                  tifCcittG31dEol = 2      Group 3        1Dimension with End Of Line.

                                                                  tifCcittG32d = 3           Group 3        2Dimension.

                                                                  tifCcittG4 = 4                Group 4.

                            Offset                     Long                The position of the first data byte in the file.

                            Width                     Integer             The width of the image.

                            Height                     Integer             The height of the image.

                            FillOrder                Integer             The bit order in the file. This can be:

                                                                  tiffoNormal = 1                Normal bit order.

                                                                  tiffoReverse = 2               Reverse bit order.

                            ByteOrder              Integer             The byte order in the file. This can be:

                                                                  tifboLowToHigh = 18761    Intel type.

                                                                  tifboHighToLow = 19789    Motorola type.

See Also              EncodeCcittImage Method

DecodeMMRImage Method

Description         Loads the specified IBM MMR image file.

Syntax                 Dib = [BITIFF.]DecodeMMRImage FileName Compression Offset Width Height FillOrder ByteOrder

Remarks             Dib                          LONGLONG The device independent bitmap. 0 if error occurred.

                            FileName                String              The file name of an IBM MMR format file.

                            Compression          Integer             The compression mode of the image. This can be one of the following:

                                                                  tifIbmMmrNoComp = 0 No compression.

                                                                  tifIbmMmrIoca = 1         IOCA format. If this compression mode specified, the rest of the parameters are ignored (they are stored in the IOCA header).

                            Offset                     Long                The position of the first data byte in the file.

                            Width                     Integer             The width of the image.

                            Height                     Integer             The height of the image.

                            FillOrder                Integer             The bit order in the file. This can be:

                                                                  tiffoNormal = 1                Normal bit order.

                                                                  tiffoReverse = 2               Reverse bit order.

                            ByteOrder              Integer             The byte order in the file. This can be:

                                                                  tifboLowToHigh = 18761    Intel type.

                                                                  tifboHighToLow = 19789    Motorola type.

See Also              EncodeMMRImage Method

 

DeleteTag  Method

Description         Deletes a tiff tag of an image in a tiff file.

Syntax                 RetVal = [BITIFF.]DeleteTag FileName Image TagID

Returns               RetVal                    Boolean           Returns true on success, otherwise false.

Remarks             FileName                Stirng              The name of the tiff file.

                            Image                     Integer             The number of the image to delete the tag from. The first image is 0.

                            TagID                     Integer             The ID of the tag to delete. Predefined tags cannot be deleted. If you try to do this, the method returns false.

See Also              AddNumericTag Method, AddNumericTagBuffer Method,
AddStringTag Method

 

DeleteTiffImage  Method

Description         Deletes an image from the TIFF file named lpszFileName. Does all low level calls internally in the DLL. To retrieve the last error, use the TiffErrorString().

Syntax                 RetVal = [BITIFF.]DeleteTiffImage lpszFileName nImage bFast

Returns               RetVal                    Boolean           TRUE on success, otherwise FALSE.

Remarks             lpszFileName         Stirng              Path to the TIFF file.

                            nImage                   Integer             The zero based position to delete the image at.

                            bFast                      Boolean           If TRUE, Document Imaging SDK uses the fast deleting method. Otherwise the slow one is used.

See Also              InsertTiffImage Method, ReorderTiffFile Method

 

DIBFormOverlay  Method

Description         Returns a form overlayed image.

Syntax                 Dib = [BITIFF.]DIBFormOverlay TiffFileName TextFileName PageWidth PageLength Xmargin Ymargin TypeFace FontPointSize XDPI YDPI LineSpace TabArray Flags

Remarks             Dib                          LONGLONG The overlayed device independent bitmap. 0 if error occurred.

                            TiffFileName         String              Name of a Tiff format file.

                            TextFileName        String              Name of an ASCII text file. The file must not be longer than 65535 bytes.

                            PageWidth             Integer             The page width is defined in 100 of an inch. An 8 1/2 inch page will be 850.

                            PageLength           Integer             The page length is defined in 100 of an inch. An11 inch page should be 1100.

                            Xmargin                 Integer             The left and right margin on a page is defined in 100 of an inch. A 1/2 inch margin should be 50. On an 8 1/2 page a half inch margin should leave a 7 1/2 inch client area. Range must be in the page size limits.

                            Ymargin                 Integer             The top and bottom margin is defined in 100 of an inch. A 1/2 inch margin should be 50. On an 11 inch page a half inch margin should leave a 10 inch client area. Range must be in the page size limits.

                            TypeFace               String              The type face string.

                            FontPointSize        Integer             The font size in points. The range should be 6 to 72 points.

                            XDPI                      Integer             Horizontal DPI resolution of bitmap. Range should be 50 - 600 DPI.

                            YDPI                      Integer             Vertical DPI resolution of bitmap. Range should be 50 - 600 DPI.

                            LineSpace              Integer             Distance between two lines.

                            TabArray              Integer             The tab stops. Maximum of 15. You should pass the first item of an array to this parameter. The first zero value in the array indicates that there are no more tabs.

                            Flags                       Long                This can be any combination of the following values, except the tifafMeasureInch and tifafMeasureMeter flags:

                                                                  tifafTextBold = 4                   The entire text is bold.

                                                                  tifafTextItalic = 2                  The entire text is italic.

                                                                  tifafMeasureInch = 1            The measurement is in inch (default).

                                                                  tifafMeasureMeter = 8          The measurement is in millimeter.

 

This method is designed for text retrieval application to overlay scanned form image. It overlays a form with ASCII text in a transparent mode. The form is a black and white TIFF file. The overlay will start from the top left corner of the image. The carriage return and line feed is used to advance to a new line on the form.

The image should have valid dot per inch resolution (DPI). The Image DPI will be used to scale the font size to get a proportional view.

See Also              CreateDIBFaxPageFromASCII Method

 

DownloadImageFileURL  Method

Description         This method downloads a specified image file from an URL to the local machine. This method should be called only once at the same time.

Syntax                 [BITIFF.]DownloadImageFileURL  szURL szFileName

Remarks             szURL                    String              Specifies an URL of an image file that should be downloaded. The method can download text, bitmap, clipboard and Black Ice FAX images.

                            szFileName            String              Path and name of the filename on the local machine.

See Also              LoadImageFromURL Method, URLDownloadImageFileComplete Event

 

EncodeCcittImage  Method

Description         Saves a device independent bitmap to the specified CCITT file.

Syntax                 RetVal = [BITIFF.]EncodeCcittImage  FileName Dib Compression

Returns               RetVal                    Boolean           True on success, otherwise False.

Remarks             FileName                String              The destination file name.

                            Dib                          LONGLONG Device independent bitmap to save.

                            Compression          Integer             The compression mode of the image. This can be one of the following:

                                                                  tifCcittNoComp = 0     No compression (Raw image).

                                                                  tifCcittG31dNoEol = 1 Group 3        1Dimension with No End Of Line (Group 2).

                                                                  tifCcittG31dEol = 2      Group 3        1Dimension with End Of  Line.

                                                                  tifCcittG32d = 3           Group 3        2Dimension.

                                                                  tifCcittG4 = 4                Group 4.

See Also              DecodeCcittImageFrom Method

 

EncodeMMRImage  Method

Description         Saves a device independent bitmap to the specified IBM MMR file.

Syntax                 RetVal = [BITIFF.]EncodeMMRImage FileName Dib Compression

Returns               RetVal                    Boolean           True on success, otherwise False.

Remarks             FileName                String              The destination file name.

                            Dib                          LONGLONG Device independent bitmap to save.

                            Compression          Integer             The compression mode of the image. This can be one of the following:

                                                               tifIbmMmrNoComp = 0 No compression.

                                                               tifIbmMmrIoca = 1         IOCA format. If this compression mode specified, the rest of the parameters are ignored (they are stored in the IOCA header).

See Also              DecodeMMRImage Method

 


FindBlackPage  Method

Description         This method searches the specified "szTiffFileName" single page or multi-page TIFF file for black pages based on the ratio of black and white pixels on the page. If it finds a black page the function will return the offset in 1 base numbering. This method works for only 1, 8, and 24 bit per pixel images.

Syntax                 RetVal = [BITIFF.]FindBlackPage szTiffFileName nRatio iPage sRed sGreen sBlue

Returns               RetVal                    Short               >0:    The 1 based offset of the page in the TIFF file.

 -1:    On error.

  0:    There is no black page in the TIFF file.

Remarks             szTiffFileName      Long                The TIFF file path name.

                            nRatio                    Long                The ratio of black and white pixels on the page in 0.1 percent units. For example 100 is 10 percent ratio black pixels on the white background. Boundary values are 0 to 1000 inclusive.

                            iPage                       Short               Zero based page number. The function starts searching from this page in the image file. This value must be 0 and number of pages in the image file - 1.

                            sRed                       Short               This parameter is noticed for only 8 and 24 bit per pixel images. This parameter contains the limit value of the red RGB component for black page detecting.

                            sGreen                    Short               This parameter is noticed for only 8 and 24 bit per pixel images. This parameter contains the limit value of the green RGB component for black page detecting.

                            sBlue                       Short               This parameter is noticed for only 8 and 24 bit per pixel images. This parameter contains the limit value of the blue RGB component for black page detecting.

 

For example if sRed = 240, sGreen = 240, sBlue = 240 and the RGB components values of the current pixel of the image are less than 240 then the pixel is a black pixel.

 

See Also          IsImageBlack Method


FindBlankPage  Method

Description         This method searches the specified "szTiffFileName" single page or multi-page TIFF file for blank pages based on the ratio of black and white pixels on the page. If it finds a blank page the function will return the offset in 1 base numbering. This method works for only 1, 8, and 24 bit per pixel images.

Syntax                 RetVal = [BITIFF.]FindBlankPage szTiffFileName nRatio iPage sRed sGreen sBlue

Returns               RetVal                    Short               >0:    The 1 based offset of the page in the TIFF file.

 -1:    On error.

  0:    There is no blank page in the TIFF file.

Remarks             szTiffFileName      Long                The TIFF file path name.

                            nRatio                    Long                The ratio of black and white pixels on the page in 0.1 percent units. For example 100 is 10 percent ratio black pixels on the white background. Boundary values are 0 to 1000 inclusive.

                            iPage                       Short               Zero based page number. The function starts searching from this page in the image file. This value must be 0 and number of pages in the image file - 1.

                            sRed                       Short               This parameter is noticed for only 8 and 24 bit per pixel images. This parameter contains the limit value of the red RGB component for blank page detecting.

                            sGreen                    Short               This parameter is noticed for only 8 and 24 bit per pixel images. This parameter contains the limit value of the green RGB component for blank page detecting.

                            sBlue                       Short               This parameter is noticed for only 8 and 24 bit per pixel images. This parameter contains the limit value of the blue RGB component for blank page detecting.

 

For example if sRed = 240, sGreen = 240, sBlue = 240 and the RGB components values of the current pixel of the image are greater than 240 then the pixel is a blank pixel.

See Also              IsImageBlank Method

 

FreeASCIIPagesArray  Method

Description         This method frees the memory allocated the CreateDIBFaxPageFromASCIIEXT method storing DIBs loaded. This array allocated before loading the ASCII file. The CreateDIBFaxPageFromASCIIExt method should be used in ASP, C# and J# application for loading ASCII file instead of CreateDIBFaxpageFromASCII method.

 Syntax                [BITIFF.] FreeASCIIPagesArray

Remarks

See Also              GetDIBFromPagesArray Method CreateDIBFaxPageFromASCIIEXT Method GetSizeOfASCIIPagesArray Method

 

GetByteOrder  Method

Description         Retrieves the byte order of an entite tiff file.

Syntax                 ByteOrder = [BITIFF.]GetByteOrder FileName

Remarks             ByteOrder              Integer             Returns tifboLowToHigh = 18761, if the byte order is Intel type (low to high).
Returns tifboHighToLow
 = 19789, if the byte order is Motorola type (high to low).
Returns 0, if error occurred.

                            FileName                Stirng              The name of the tiff file.

See Also              SetByteOrder Method

 

GetDIBFromPagesArray  Method

Description         This method gets the specified DIB from the array of DIBs loaded with CreateDIBFaxPageFromASCIIExt method. This array allocated before loading the ASCII file. The CreateDIBFaxPageFromASCIIExt method should be used in ASP, C# and J# application for loading ASCII file instead of CreateDIBFaxpageFromASCII method.

 Syntax                Dib = [BITIFF.] GetDIBFromPagesArray Num

Remarks             Dib                          LONGLONG Handle of the DIB, 0 on error.

                            Num                       Short               Zero based integer. Position in the array. This value is between 0 and the first parameter of the CreateDIBFaxPageFromASCIIExt method.

See Also              FreeASCIIPagesArray Method CreateDIBFaxPageFromASCIIEXT Method GetSizeOfASCIIPagesArray Method

 

GetErrorString  Method

Description         Returns the error string matched to the given error code.

Syntax                 ErrorString = [BITIFF.]GetErrorString ErrorCode

Remarks             ErrorString           String              The description of the specified error.

                            ErrorCode             Integer             The code of an error.

See Also              BiTiffGetLastError Method

 

GetNumberOfImagesInTiffFile  Method

Description         Returns the number of images in a multi-page TIFF file.

Syntax                 Count = [BITIFF.]GetNumberOfImagesInTiffFile FileName

Remarks             FileName                Stirng              The name of the tiff file.

 

GetNumberOfTags  Method

Description         Returns the number of tiff tags of an image in a tiff file.

Syntax                 TagNum = [BITIFF.]GetNumberOfTags FileName Image

Remarks             TagNum                 Integer             The number of tags of the specified image. Returns 0 on error.

                            FileName                Stirng              The name of the tiff file.

                            Image                     Integer             The number of the image. The first image is 0.

                            Use this method to count the tiff tags of an image to allocate a buffer. This buffer will get the tag IDs, when you call the GetTagIDs method.

See Also              GetTagIDs Method

 

GetNumericTag  Method

Description         Retrieves a single tag data of an image of a tiff file. Returns the data stored in the specified tag, if the tag type is tifttByte = 1, tifttShort = 3 or tifttLong = 4 and the number of data items is 1. If you are unsure, check the tag type with the GetTagType method or check the number of data items with the GetTagCount method before you call this method.

Syntax                 Data = [BITIFF.]GetNumericTag FileName Image TagID

Remarks             Data                        Long              If the function succeeds, returns the data itself (it can be byte, integer, or long, but a long value can contain all of them). Otherwise returns -1.

                            FileName                Stirng             The name of the tiff file.

                            Image                     Integer           The number of the image to get the tag data from. The first image is 0.

                            TagID                     Integer           The ID of the tag which data.is required.

See Also              AddNumericTag Method, GetNumericTagBuffer Method,
GetTagCount Method, GetTagType Method

GetNumericTagBuffer  Method

Description         Retrieves multiple tag data of an image of a tiff file. Returns the data stored in the specified tag, if the tag type is tifttByte = 1, tifttShort = 3, tifttLong = 4 or tifttRational = 5. If you are unsure, check the tag type with the GetTagType method before you call this method.

Syntax                 Items = [BITIFF.]GetNumericTagBuffer            FileName Image TagID DataBuffer MaxCount

Remarks             Items                       Long                Returns the number of data items copied to the given buffer. If an error occurred, 0 is returned.

                            FileName                Stirng              The name of the tiff file.

                            Image                     Integer             The number of the image to get the tag data from. The first image is 0.

                            TagID                     Integer             The ID of the tag which data.is required.

                            DataBuffer            Long                The first item of an array to get the tag data into. To specify the size of the buffer, use the GetTagCount method.

                            MaxCount             Long                The maximum number of data items allowed to be copied into the buffer.

See Also              AddNumericTagBuffer Method, GetNumericTag Method,
GetTagCount Method, GetTagType Method

 

GetNumericTagValue  Method

Description         Retrieves a tag data of an image of a tiff file. Returns the data stored in the specified tag, if the tag type is tifttByte = 1, tifttShort = 3, tifttLong = 4 or tifttRational = 5, that you specified. If you are unsure, check the tag type with the GetTagType method before you call this method.

Syntax                 tagData = [BITIFF.]GetNumericTagValue         FileName Image TagID Which

Remarks             tagData                  Long                Returns a data from the tag. If an error occurred, 0 is returned.

                            FileName                Stirng              The name of the tiff file.

                            Image                     Integer             The number of the image to get the tag data from. The first image is 0.

                            TagID                     Integer             The ID of the tag which data.is required.

                            Which                     Long                The data, that you want to query. To specify the data count, use the GetTagCount method.

See Also              AddNumericTagBuffer Method, GetNumericTag Method,
GetTagCount Method, GetTagType Method

 

 

GetSizeOfASCIIPagesArray  Method

Description         This method gets the size of the array of DIBs allocated the CreateDIBFaxpageFromASCIIEXT method. This array allocated before loading the ASCII file. The CreateDIBFaxPageFromASCIIExt method should be used in ASP, C# and J# application for loading ASCII file instead of CreateDIBFaxpageFromASCII method.

 Syntax                Ret = [BITIFF.] GetSizeOfASCIIPagesArray

Remarks             Ret                          Short               Size of the array, 0 on error.

See Also              GetDIBFromPagesArray Method CreateDIBFaxPageFromASCIIEXT Method FreeASCIIPagesArray Method

 

GetStringTag  Method

Description         Retrieves string tag data of an image of a tiff file. Returns the data stored in the specified tag, if the tag type is tifttAscii = 2. If you are unsure, check the tag type with the GetTagType method before you call this method.

Syntax                 Data = [BITIFF.]GetStringTag FileName Image TagID

Remarks             Data                        String              If the function succeeds, returns the data itself (the string). Otherwise returns an empty string.

                            FileName                Stirng              The name of the tiff file.

                            Image                     Integer             The number of the image to get the tag data from. The first image is 0.

                            TagID                     Integer             The ID of the tag which data.is required.

See Also              AddStringTag Method, GetNumericTag Method,
GetNumericTagBuffer Method, GetTagType Method

 

GetTabStopInASCIIFile  Method

Description         This method gets the values of tab stops. This method is used for loading ASCII file with CreateDIBFaxPageFromASCIIExt method. The CreateDIBFaxPageFromASCIIExt method should be used in ASP, C# and J# application for loading ASCII file instead of CreateDIBFaxpageFromASCII method. The array of tabstops contains maximum 16 value.

Syntax                 Ret = [BITIFF.] GetTabStopInASCIIFile Num

Remarks             Ret                          Short               Value of the Num-th element in the tab array.

                            Num                       Short               Zero based integer. Position in the array. This value is between 0 and 15.

See Also              SetTabStopInASCIIFile Method CreateDIBFaxPageFromASCIIEXT Method

 

GetTagCount  Method

Description         Returns the number of data items in a tiff tag of an image in a tiff file.

Syntax                 TagCount = [BITIFF.]GetTagCount FileName Image TagID

Remarks             TagCount              Long                The number of data items of the specified tag. Returns 0 on error.

                            FileName                Stirng              The name of the tiff file.

                            Image                     Integer             The number of the image. The first image is 0.

                            TagID                     Integer             The ID of the tag which data count is required.

                            Use this method to count the number of data items of a tag to allocate a buffer. This buffer will get the tag data, when you call the GetNumericTagBuffer method.

See Also              GetNumericTag Method, GetNumericTagBuffer Method

GetTagID  Method

Description         Retrieves a tag ID of an image of a tiff file, that you give.

Syntax                 tagID = [BITIFF.]GetTagID FileName Image Which

Remarks             tagID                      Integer             Returns the ID, that you give. If an error occurred, 0 is returned.

                            FileName                String              The name of the tiff file.

                            Image                     Integer             The number of the image to get IDs from. The first image is 0.

                            Which                     Integer             Which Tag ID do you want to query. To specify the count of the TagIDs, use the GetNumberOfTags method.

See Also              GetNumberOfTags Method

 

GetTagIDs  Method

Description         Retrieves the tag IDs of an image of a tiff file.

Syntax                 Items = [BITIFF.]GetTagIDs FileName Image IDBuffer MaxCount

Remarks             Items                       Integer             Returns the number of IDs copied to the given buffer. If an error occurred, 0 is returned.

                            FileName                String              The name of the tiff file.

                            Image                     Integer             The number of the image to get IDs from. The first image is 0.

                            IDBuffer                Integer             The first item of an array to get the IDs into. To specify the size of the buffer, use the GetNumberOfTags method.

                            MaxCount             Integer             The maximum number of IDs allowed to be copied into the buffer.

See Also              GetNumberOfTags Method

 

GetTagType  Method

Description         Returns the type of a tiff tag of an image in the tiff file.

Syntax                 TagType = [BITIFF.]GetTagType FileName Image TagID

Remarks             TagType                Integer             The type of the specified tag. Returns tifttUnknown = 0 on error or if the type of the tag data is not known. Available types are:

                                                                  tifttByte = 1

                                                                  tifttAscii = 2

                                                                  tifttShort = 3

                                                                  tifttLong = 4

                                                                  tifttRational = 5

                            FileName                Stirng              The name of the tiff file.

                            Image                     Integer             The number of the image. The first image is 0.

                            TagID                     Integer             The ID of the tag which data type.is required.

 

                            Use this method to make a decision about what method you should call to get tag data. These are GetNumericTag, GetNumericTagBuffer andGetStringTag.

See Also              GetNumericTag Method, GetNumericTagBuffer Method,
GetStringTag Method

 

GetTiffColorSpace  Method

Description         Retrieves the color space of the TIFF image. Available color spaces: YUV, YIQ, XYZ, LAB, CMY, HSI, HSV. The color space information stores in the PHOTOMETRICINTERPRETATION tag.

                            Available tags:

            PI_YUV         10

PI_CMY         11

PI_YIQ           13

PI_HSV          14

PI_HSI            15

PI_XYZ          16

PI_LAB          17

 

Syntax                 RetVal = [BITIFF.]GetTiffColorSpace lpszFileName nImage

Returns               RetVal                    Integer             Color space of the image, -1 on error.

Remarks             lpszFileName         String              Path to the TIFF file.

See Also              LoadNonRGBTiffIntoDIB Method, SaveNonRGBDIBInTiffFile Method

 

InsertTiffImage  Method

Description         Saves the device independent bitmap (hDIB) in the TIFF file named lpszFileName. Does all low level calls internally in the DLL. To retrieve the last error, use the TiffErrorString(). The wCompMode must be set to one of the compression types defined in the Document Imaging SDK USER’S GUIDE. The wCompMode is ignored if DisplayDlg is set to TRUE.

Syntax                 RetVal = [BITIFF.]InsertTiffImage lpszFileName hDIB wCompMode DisplayDlg nFillOrder nImage bFast bChange

Returns               RetVal                    Boolean           TRUE on success, otherwise FALSE.

Remarks             lpszFileName         String              Path to the TIFF file.

                            hDib                       LONGLONG Device independent bitmap to be inserted or changed.

                            wCompMode         Integer             Compression type. The compression types defined in the enumCompressionTypes. Available Compression types:

                                                                                    TCOMP_NOCOMP - No compression

                                                                                    TCOMP_PACKBITS - Packbit

                                                                                    TCOMP_LZW - LZW

                                                                                    TCOMP_LZW_DIFF - LZW with 

                                                                                                 differentiation

                                                                                    TCOMP_CCITTG2 - CCITT Group 3

                                                                                                 1D NO EOL

                                                                                    TCOMP_CCITTG31D - CCITT

                                                                                     Group 3 1D

                                                                                    TCOMP_CCITTG32D - CCITT

                                                                                                 Group 3 2D

                                                                                    TCOMP_CCITTG4 - CCITT Group 4                                                                       TCOMP_JPEG - JPEG

                            DisplayDlg             Boolean           Display dialog box.

                            nFillOrder              Integer             Fill order.

                            nImage                   Integer             The zero based position to insert or change the image at.

                            bFast                      Boolean           If TRUE, Document Imaging SDK uses the fast saving method. Otherwise the slow one is used.

                            bChange                Boolean           If TRUE, the specified image will be changed with the new one. Otherwise the new image will be inserted at the given position.

See Also              DeleteTiffImage Method, ReorderTiffFile Method

 

LoadCALS  Method

Description         Loads the specified CALS image file.

Syntax                 Dib = [BITIFF.]LoadCALS FileName Dialog

Remarks             Dib                          LONGLONG The device independent bitmap. 0 if error occurred.

                            FileName                String              The file name of a CALS format file.

                            Dialog                     Boolean           Display information dialog box before loading the image.

                                                                  True                Enables to display dialog box.

                                                                  False               Prevents to display dialog box.

See Also              SaveCALS Method

Note:                   This method does not free the DIB.  Call the DropDIB method to free up the DIB

 

LoadImageFromURL  Method

Description         This method loads the specified image from an URL into a device independent bitmap. This method should be called only once at the same time.

Syntax                 [BITIFF.]LoadImageFromURL  szURL nImage

Remarks             szURL                    String              Specifies an URL of an image file that should be loaded into device independent bitmap. The method can load cals and TIFF images.

                            nImage                   short                This parameter specifies the zero based page number that should be loaded from the image file, if available. This parameter is available for only TIFF images.

 

See Also              DownloadImageFileURL Method, URLLoadImageComplete Event

 

LoadTiffFromMemory  Method

Description         This method loads an image from the TIFF file stored in a memory block. You can have TIFF images in the memory block by loading binary data from files, databases, etc.

Syntax                 RetVal = [BITIFF.] LoadTiffFromMemory hTiffInMemory nImage

Returns               RetVal                    LONGLONG DIB on success, otherwise 0.

Remarks             hTiffInMemory     LONGLONG Handle of the memory block.

                            nImage                   LONG             The nth image, or page number, for multi page images.  Numbering is zero based, for example:  Page 2 would be referenced as ‘1’.

See Also

Note:                   This method does not free the DIB.  Call the DropDIB method to free up the DIB

LoadTiffIntoDIB  Method

Description         Loads the specified image from a TIFF file.

Syntax                 Dib = [BITIFF.]LoadTiffIntoDIB FileName Image Dialog

Remarks             Dib                          LONGLONG The device independent bitmap. 0 if error occurred.

                            FileName                String              The file name of a TIFF format file.

                            Image                     Integer             The number of the image. The image count begins at 0.

                                                                                    The nth image, or page number, for multi page images.  Numbering is zero based, for example:  Page 2 would be referenced as ‘1’

                            Dialog                     Boolean           Displays a dialog that contains general information about the image, like date, size and compression.

                                                                  True                Enables to display dialog box.

                                                                  False               Prevents to display dialog box.

See Also              SaveDIBInTiffFormat Method

Note:                   This method does not free the DIB.  Call the DropDIB method to free up the DIB

 

 

LoadNonRGBTiffIntoDIB  Method

Description         Loads the specified non RGB image from a TIFF file.

Syntax                 Dib = [BITIFF.]LoadNonRGBTiffIntoDIB FileName Image

Remarks             Dib                          LONGLONG The device independent bitmap. 0 if error occurred.

                            FileName                String              The file name of a TIFF format file.

                            Image                     Integer             The number of the image. The image count begins at 0.

See Also              SaveNonRGBDIBInTiffFile Method, GetTiffColorSpace Method

Note:                   This method does not free the DIB.  Call the DropDIB method to free up the DIB

 

MergeTiffFiles  Method

Description         The method will combine two TIFF Files into a single multi page TIFF File. The szFileName will be appended to the szDestinationFileName. The szFileName can be a multi page TIFF File and every page in szFileName will be appended to szDestinationFileName.

Syntax                 RetVal = [BITIFF.]MergeTiffFiles szDestinationFileName szFileName

Returns               RetVal                    BOOL             TRUE on success, otherwise FALSE.

Remarks             szDestinationFileName     STRING         The source TIFF File. It must be a multipage TIFF File.

                            szFileName            STRING         The new TIFF File generated after the split.

See Also              CutTiffFile Method, SplitTiffFile Method, MergeProgress Event

 

OpenForCopy  Method

Description         Opens a TIFF format file for copying. This method is designed to use with the CopyTiffImage method only. Use this method when you want to split a multipage TIFF file to single page TIFF files, or  you want to merge single page TIFF files to one, multipage TIFF file. If  you need only a few pages, use the CopyTiffImage method instead. Do not use any other method to the specified file while it will not be closed with the CloseCopyHandle, except the CopyTiffImage method, otherwise your program may hang. This method  keeps on top the performance of the operation, and  doesn’t deal with any parameter checking, including page number existance.

Syntax                 Handle = [BITIFF.]OpenForCopy FileName Mode

Remarks             Handle                    LONGLONG The handle of the opened TIFF file. If this handle is 0, an error has occurred.

                            FileName                String              The name of the source or the the destination file.

                            Mode                      Integer             The mode the file will be opened in.

                                                                  tifomRead= 0       Opens a file for reading only.

                                                                  tifomAppend= 2  Opens a file for appending the images to that file, or create a new file, if it doesn’t exist.

                                                                  tifomCreate= 3    Opens a new file always, or overwrite an existing one.

See Also              CopyTiffImage Method, CloseCopyHandle Method

 

ReorderTiffFile  Method

Description         Reorders the TIFF file named lpszFileName. Does all low level calls internally in the DLL. To retrieve the last error, use the TiffErrorString().

Syntax                 RetVal = [BITIFF.]ReleaseDC String  lpszFileName

Returns               RetVal                    Boolean           TRUE on success, otherwise FALSE.

Remarks             lpszFileName         String              Path to the TIFF file.

See Also              InsertTiffImage Method, DeleteTiffImage Method

 

SaveCALS  Method

Description         Saves a device independent bitmap to the specified CALS file.

Syntax                 RetVal = [BITIFF.]SaveCALS FileName Dib Ori1 Ori2 Dialog

Returns               RetVal                    Boolean           True on success, otherwise False. If parameter Dialog is TRUE and the user presses the Cancel button when the dialog apears, the method will return FALSE.

Remarks             FileName                String              The destination file name.

                            Dib                          LONGLONG Device independent bitmap to save.

                            Ori1                        Integer             Orientation-1. Default: 90

                            Ori2                        Integer             Orientation-2. Default: 270

                            Dialog                     Boolean           Display information dialog box before saving the image.

                                                                  True          Enables to displays dialog box.

                                                                  False         Prevents to display dialog box.

See Also              LoadCALS Method

 

SaveDIBInBicomTiffFile  Method

Description         Saves a device independent bitmap to the specified TIFF file in Bicom format.

Syntax                 RetVal = [BITIFF.]SaveDIBInBicomTiffFile FileName Dib

Returns               RetVal                    Boolean           True on success, otherwise False.

Remarks             FileName                String              The destination file name.

                            Dib                          LONGLONG Device independent bitmap to save.

Usage                  Use this method to save a TIFF file for use with Bicom fax boards. Do not forget to call the UpdatePageNumbers method before using the file for faxing.

See Also              LoadTIFFIntoDIB Method, UpdatePageNumbers Method

 

SaveDIBInDialogicTiffFile  Method

Description         Saves a device independent bitmap to the specified TIFF file in Dialogic format

Syntax                 RetVal = [BITIFF.]SaveDIBInDialogicTiffFile FileName Dib Compression

Returns               RetVal                    Boolean           True on success, otherwise False.

Remarks             FileName                String              The destination file name.

                            Dib                          LONGLONG Device independent bitmap to save.

                            Compression          Integer             Method of compression:

tifcmNoComp = 201     Uncompressed image.

tifcmPackBits = 202     Byte-oriented run-length coding.

tifcmLzw = 203             Lempel-Ziv & Welch coding.

tifcmLzwDiff = 204      Differential Lempel-Ziv & Welch coding.

tifcmCcittG2 = 205       CCITT Group 3 1 dimensional NO EOL coding.

tifcmCcittG31D = 206  CCITT Group 3 1dimensional coding.

tifcmCcittG32D = 207  CCITT Group 3 2dimensional coding.

tifcmCcittG4 = 208       CCITT Group 4             coding.

tifcmJpeg = 209            JPEG coding.

Usage                  Use this method to save a TIFF file for use with Dialogic fax boards.

See Also              LoadTIFFIntoDIB Method

 

SaveDIBInGammaTiffFile  Method

Description         Saves a device independent bitmap to the specified TIFF file in GammaLink format.

Syntax                 RetVal = [BITIFF.]SaveDIBInGammaTiffFile FileName Dib Hires

Returns               RetVal                    Boolean           True on success, otherwise False.

Remarks             FileName                String              The destination file name.

                            Dib                          LONGLONG Device independent bitmap to save.

                     Hires                       Boolean           How to set the DPI settings of the image.

True                Set image DPI to 204*196.

False               Set image DPI to 204*98.

Usage                  Use this method to save a TIFF file for use with GammaLink fax boards.

See Also              LoadTIFFIntoDIB Method

 

SaveDIBInTiffFormat  Method

Description         Saves a device independent bitmap to the specified TIFF file with CISCO format.

Syntax                 RetVal = [BITIFF.] SaveDIBInTiffFormat FileName Dib Compression Dialog

Returns               RetVal                    Boolean           True on success, otherwise False.

Remarks             FileName                String              The destination file name.

                            Dib                          LONGLONG Device independent bitmap to save.

                            Compression          Short               Method of compression:

TCOMP_NOCOMP = 201         Uncompressed image.

TCOMP_PACKBITS = 202      Byte-oriented run-length coding.

TCOMP_LZW = 203                  Lempel-Ziv & Welch coding.

TCOMP_LZW_DIFF= 204       Differential Lempel-Ziv & Welch coding.

TCOMP_CCITTG2 = 205         CCITT Group 3 1dimensional NO EOL coding.

TCOMP_CCITTG31D = 206    CCITT Group 3  1dimensional coding.

TCOMP_CCITTG32D = 207    CCITT Group 3 2dimensional coding.

TCOMP_CCITTG4 = 208         CCITT Group 4 coding.

TCOMP_JPEG = 209                JPEG coding.

                     Dialog                     Boolean           Display information dialog box before saving the image.

                                                          True                Enables to display dialog box. Ignores setting of the Compression and FillOrder parmeter.

                                                          False               Prevents to display dialog box.

See Also              LoadTIFFIntoDIB Method

SaveTiffForCiscoFormat Method

Description         Saves a device independent bitmap to the specified TIFF file. In the TIFF CISCO format the tags are in the beginning of the file.

Syntax                 RetVal = [BITIFF.]SaveDIBInTiffFormat FileName Dib Compression FillOrder Dialog

Returns               RetVal                    Boolean           True on success, otherwise False.

Remarks             FileName                String              The destination file name.

                            Dib                          LONGLONG Device independent bitmap to save.

                            Compression          Short               Method of compression:

tifcmNoComp = 201  Uncompressed image.

tifcmPackBits = 202  Byte-oriented run-length coding.

tifcmLzw = 203          Lempel-Ziv & Welch coding.

tifcmLzwDiff = 204   Differential Lempel-Ziv & Welch coding.

tifcmCcittG2 = 205       CCITT Group 3   1dimensional NO EOL coding.

tifcmCcittG31D = 206  CCITT Group 3   1dimensional coding.

tifcmCcittG32D = 207  CCITT Group 3   2dimensional coding.

tifcmCcittG4 = 208       CCITT Group 4   coding.

tifcmJpeg = 209         JPEG coding.

FillOrder                Short               Fill order.

                                                                        tiffoNormal    Normal fill order.

                                                                        tiffoReverse   Reverse fill order.

                     Dialog                     Boolean           Display information dialog box before saving the image.

                                                          True                Enables to display dialog box. Ignores setting of the Compression parmeter.

                                                          False               Prevents to display dialog box.

See Also              LoadTIFFIntoDIB Method, SaveDIBInTiffFormat Method

SaveTiffToMemory  Method

Description         Saves a device independent bitmap to the memory block. If hMem parameter is a valid TIFF file in the memory, the method appends the image to the TIFF, otherwise creates a new TIFF image in the memory.

Syntax                 RetVal = [BITIFF.]SaveTiffToMemory hMem hDib CompMode FillOrder

Returns               RetVal                    LONGLONG Handle to the memory block or 0.

Remarks             hMem                     LONGLONG The destination memory handle or 0.

                            hDib                       LONGLONG Device independent bitmap to save.

                            Compression          Integer             Method of compression:

tifcmNoComp = 201  Uncompressed image.

tifcmPackBits = 202  Byte-oriented run-length coding.

tifcmLzw = 203          Lempel-Ziv & Welch coding.

tifcmLzwDiff = 204   Differential Lempel-Ziv & Welch coding.

tifcmCcittG2 = 205    CCITT Group 3    1dimensional NO EOL coding.

tifcmCcittG31D = 206     CCITT Group 3          1dimensional coding.

tifcmCcittG32D = 207  CCITT Group 3   2dimensional coding.

tifcmCcittG4 = 208       CCITT Group 4   coding.

tifcmJpeg = 209         JPEG coding.

                     FillOrder                Long                Fill Order

                                                          tiffoNormal    Normal bit order.

                                                          tiffoReverse   reverse bit order.

 

See Also          SaveDIBInTiffFormat Method, LoadTiffFromMemory Method

SaveNonRGBDIBInTiffFile  Method

Description         Saves a non RGB device independent bitmap to the specified TIFF file.

Syntax                 RetVal = [BITIFF.] SaveNonRGBDIBInTiffFile FileName Dib

Returns               RetVal                    Boolean           True on success, otherwise False.

Remarks             FileName                String              The destination file name.

                            Dib                          LONGLONG Device independent bitmap to save.

 

See Also              LoadNonRGBTIFFIntoDIB Method, GetTiffColorSpace Method

 

SaveNmsTIFF  Method

Description         Saves a device independent bitmap to the specified TIFF file in Natural Micro Systems format.

Syntax                 RetVal = [BITIFF.]SaveNmsTIFF FileName Dib

Returns               RetVal                    Boolean           True on success, otherwise False.

Remarks             FileName                String              The destination file name.

                            Dib                          LONGLONG Device independent bitmap to save.

Usage                  Use this method to save a TIFF file for use with NMS fax boards. Do not forget to call the UpdatePageNumbers method before using the file for faxing.

See Also              LoadTIFFIntoDIB Method, UpdatePageNumbers Method

 

SetByteOrder  Method

Description         Sets the byte order of an entire TIFF file (all the images in a TIFF file must be the same byte order).

Syntax                 RetVal = [BITIFF.]SetByteOrder FileName ByteOrder

Returns               RetVal                    Boolean           Returns True on success, otherwise False.

Remarks             FileName                String              TIFF file name to set its byte order.

                            ByteOrder              Integer             The new byte order setting. These are:

                                                                  tifboLowToHigh = 18761           Intel type (default).

                                                                  tifboHighToLow = 19789           Motorola type.

See Also              GetByteOrder Method

 

SetTabStopInASCIIFile  Method

Description         This method sets the values of tab stops before loading the ASCII file with CreateDIBFaxPageFromASCIIExt method. The CreateDIBFaxPageFromASCIIExt method should be used in ASP, C# and J# application for loading ASCII file instead of CreateDIBFaxpageFromASCII method. The array of tabstops contains maximum 16 value.

Syntax                 bRet = [BITIFF.] SetTabStopInASCIIFile Num TabStop

Remarks             bRet                        BOOL             TRUE on success, otherwise FALSE.

                            Num                       Short               Zero based integer. Position in the array. This value is between 0 and 15.

                            TabStop                 Short               Value of the Num-th element in the tab array to specify.

See Also              GetTabStopInASCIIFile Method CreateDIBFaxPageFromASCIIEXT Method

 

SplitTiffFile  Method

Description         The method will split a multipage TIFF file into two TIFF file at the position specified by the nImage parameter. The nImage is zero based short. This function may take a considerable amount of time to perform for large images. If nImage less than 0 or greater than number of images, the method does nothing and returns immediately with FALSE. If nImage equals zero, the method move all images to the newly created TIFF File.

Syntax                 RetVal = [BITIFF.]SplitTiffFile szSourceFileName szNewFileName nImage

Returns               RetVal                    BOOL             TRUE on success, otherwise FALSE.

Remarks             szSourceFileName STRING         The source TIFF File. It must be a multipage TIFF File.

                            szNewFileName     STRING         The new TIFF File generated after the split.

                            nImage                   Short               Position where the source TIFF File will be split.

See Also              CutTiffFile Method, MergeTiffFiles Method, SplitProgress Event

 

UpdatePageNumbers  Method

Description         Updates the page number tag of every image in the specified TIFF file.

Syntax                 RetVal = [BITIFF.]UpdatePageNumbers FileName

Returns               RetVal                    Boolean           Returns True on success, otherwise False.

Remarks             FileName                String              TIFF file name to update its page numbers.

Usage                  Use this function after all pages are added to a Bicom/NMS tiff file. This function sets the correct page value for every image in the tiff file. It is required for Bicom/NMS fax boards only.

See Also              SaveDIBInBicomTiffFile Method