GetFaxImagePage

#include ”faxcpp.h”

#include ”faxbft.h”

int far GetFaxImagePage(                                                     FAXOBJ Fax, int PageNum, TEImageType Type,
union TUFaxImage far * PageImage, BOOL Append)

Class 1.

Class 2.

Class 2.0

Brooktrout

 

GammaLink

 

Dialogic

 

NMS

 

g

g

g

g

g

g

Description

This function returns the image of the fax. The image can be returned either in memory or in a file. The number of pages of the image are zero based. The name of the file must be specified in the TUFaxImage union (See also TUFaxImage description).  The types of the destination image can be:

IMT_MEM_DIRECT            Copy Raw data  to  memory.

                                                The  Data type depends on FaxObject type

                                                CCITT encoded  - on Normal Fax.

                                                BFT encoded  - on   Bft Fax

                                                In ECM mode enable to receive  Custom Data from another Fax C++  station 

IMT_MEM_BITMAP            Memory handle to a device dependent bitmap.

IMT_MEM_DIB                    Memory handle to a device independent bitmap.

IMT_FILE_DIRECT            Copy Raw data  to  file.

                                                The  Data type depends on FaxObject type

                                                CCITT encoded  - on Normal Fax.

                                                BFT encoded  - on   Bft Fax

                                                In ECM mode enable to receive  Custom Data from another FaxC++  station 

IMT_FILE_BMP                   The image is given as a Windows bitmap file.

IMT_FILE_PCX                   The image is given as a PCX file

IMT_FILE_DCX                   The image is given as a DCX file.

IMT_FILE_TIFF_NOCOMP         The image is given as an uncompressed TIFF file.

IMT_FILE_TIFF_PACKBITS      The image is given as a TIFF file with pack bits compression.

IMT_FILE_TIFF_LZW        The image is given as a TIFF file with LZW compression.

IMT_FILE_TIFF_LZDIFF   The image is given as a TIFF file with differential LZW compression.

IMT_FILE_TIFF_G31DNOEOL  The image is given as a TIFF file with Group 3 one dimensional NoEol compression..

IMT_FILE_TIFF_G31D      The image is given as a TIFF file with Group 2 one dimensional.

IMT_FILE_TIFF_G32D      The image is given as a TIFF file with Group 3 two dimensional compression..

IMT_FILE_TIFF_G4            The image is given as a TIFF file with G4 compression.

IMT_FILE_GIF                     The image is given as a GIF file.

IMT_FILE_TGA                   The image is given as a TGA file.

IMT_FILE_JPEG                 The image is given as  a JPEG file.

IMT_BFTOBJ                      The page is a BFT page. The PageImage -> BftObj member must point to a valid TCBinaryParam object.

Parameters

FAXOBJ

Fax

Fax object.

int

PageNum

Specifies the number of pages.

TEImageType

Type

Specifies the type of  image.

TUFaxImage far

*PageImage

Pointer a n image structure.

BOOL

Append

If TRUE, the image will be appended to the file, otherwise the file will be created or truncated.

Return Value

Returns zero on success, otherwise returns an error code. In the case of the TUFaxImage type is IMT_MEM_DIRECT or IMT_FILE_DIRECT, the function returns the number of scan lines in the image if fax object type is REGTYPE_NORMALFAX .

Sample Code

None at present.