Table of Contents Index NMS Glossary Previous Page Next Page (Page 4 of 15 in this chapter) Version


nfxConvertFileDirect

Description

Performs image format conversion on TIFF-F files.

Prototype

DWORD nfxConvertFileDirect ( CTAHD ctahd,
char *input_file,
char *output_file,
NFX_CONVERT_PARMS *ptr_convert_parms,
DWORD *ptr_converted_pages)

ctahd CTA context handle returned by ctaCreateContext.

input_file Pointer to an existing file to be converted.

output_file Pointer to file to be created to receive the conversion output.

ptr_convert_parms Pointer to a structure of parameters which identifies the options for the output format. The NFX_CONVERT_PARMS structure is defined as follows:

typedef struct 
{
 DWORD size;
 DWORD type;     /* NFX_TIFF_F or NFX_TIFF_S           */
 DWORD resolution;     /* NFX_RESOLUTION_HIGH,           */
      /* NFX_RESOLUTION_LOW,            */
      /* or NFX_RESOLUTION_SUPER_HIGH           */
 DWORD encoding;     /* NFX_ENCODE_1D, NFX_ENCODE_2D,            */
      /* NFX_ENCODE_MMR    , or NFX_ENCODE_TIFF_S       */
 DWORD pagewidth;     /* NFX_PAGE_WIDTH_A4, NFX_PAGE_WIDTH_B4           */
      /* or NFX_PAGE_WIDTH_A3           */
 DWORD badlineaction;  /* NFX_BAD_LINE_ACTION_NONE,                */
      /* NFX_BAD_LINE_ACTION_DROP,           */
      /* NFX_BAD_LINE_ACTION_REPT, or            */
      /* NFX_BAD_LINE_ACTION_TICK            */
} NFX_CONVERT_PARMS;

ptr_converted_pages Pointer to a location to receive a count of the number of pages converted.

Return Values

Events

Details

This function modifies the encoding, resolution, and page width of the input file to match the attributes specified in the NFX_CONVERT_PARMS structure. nfxConvertFileDirect also removes bad lines (as specified by the badlineaction parameter) from a TIFF-F or TIFF-S file. nfxConvertFileDirect can accept an input file that has different attributes on different pages and produce an output file that has the same attributes on all pages.

Specifying encoding with NFX_ENCODE_TIFF_S or NFX_TIFF_S overrides all parameters to the TIFF-S format. Encoding will be 1D, resolution will be LOW, and page width will be A4, regardless of any other values specified in this structure.

nfxConvertFileDirect operates only on TIFF-F or TIFF-S files. Output files are always in TIFF-F or TIFF-S format, and always have the same attributes on all pages.

This function is synchronous and consumes significant processor execution time. Pending events in this thread may be delayed by many seconds until this function completes. Note that errors occurring during the conversion process are indicated in the function return value. The number of pages converted successfully is given in ptr_converted_pages.

Note: You must continue processing events during an active fax session. Make sure that file I/O intensive operations, such as format conversion, do not interfere with the handling of events and cause the fax session to time out. Events should be processed within three seconds.

See Also

nfxCheckTIFF



Table of Contents Index NMS Glossary Previous Page Next Page (Page 4 of 15 in this chapter) Version


Want to send us feedback on our documentation? Email: Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.