28 #if !defined(_SPANDSP_T4_TX_H_) 29 #define _SPANDSP_T4_TX_H_ 180 #if defined(SPANDSP_SUPPORT_TIFF_FX) && !defined(TIFFTAG_FAXPROFILE) 181 #define TIFFTAG_INDEXED 346 182 #define TIFFTAG_GLOBALPARAMETERSIFD 400 183 #define TIFFTAG_PROFILETYPE 401 184 #define PROFILETYPE_UNSPECIFIED 0 185 #define PROFILETYPE_G3_FAX 1 186 #define TIFFTAG_FAXPROFILE 402 187 #define FAXPROFILE_S 1 188 #define FAXPROFILE_F 2 189 #define FAXPROFILE_J 3 190 #define FAXPROFILE_C 4 191 #define FAXPROFILE_L 5 192 #define FAXPROFILE_M 6 193 #define TIFFTAG_CODINGMETHODS 403 194 #define CODINGMETHODS_T4_1D (1 << 1) 195 #define CODINGMETHODS_T4_2D (1 << 2) 196 #define CODINGMETHODS_T6 (1 << 3) 197 #define CODINGMETHODS_T85 (1 << 4) 198 #define CODINGMETHODS_T42 (1 << 5) 199 #define CODINGMETHODS_T43 (1 << 6) 200 #define TIFFTAG_VERSIONYEAR 404 201 #define TIFFTAG_MODENUMBER 405 202 #define TIFFTAG_DECODE 433 203 #define TIFFTAG_IMAGEBASECOLOR 434 204 #define TIFFTAG_T82OPTIONS 435 205 #define TIFFTAG_STRIPROWCOUNTS 559 206 #define TIFFTAG_IMAGELAYER 34732 209 #if !defined(COMPRESSION_T85) 210 #define COMPRESSION_T85 9 212 #if !defined(COMPRESSION_T43) 213 #define COMPRESSION_T43 10 218 T4_IMAGE_FORMAT_OK = 0,
219 T4_IMAGE_FORMAT_INCOMPATIBLE = -1,
220 T4_IMAGE_FORMAT_NOSIZESUPPORT = -2,
221 T4_IMAGE_FORMAT_NORESSUPPORT = -3
222 } t4_image_format_status_t;
224 #if defined(__cplusplus) 228 #if defined(SPANDSP_SUPPORT_TIFF_FX) 230 SPAN_DECLARE(
void) TIFF_FX_init(
void);
322 int supported_compressions,
323 int supported_image_sizes,
324 int supported_bilevel_resolutions,
325 int supported_colour_resolutions);
417 #if defined(__cplusplus) logging_state_t * t4_tx_get_logging_state(t4_tx_state_t *s)
Get the logging context associated with a T.4 transmit context.
Definition: t4_tx.c:2875
int t4_tx_free(t4_tx_state_t *s)
End the transmission of a document. Tidy up, close the file and free the context. This should be used...
Definition: t4_tx.c:2963
int t4_tx_get_tx_image_type(t4_tx_state_t *s)
Get the image type of the encoded data.
Definition: t4_tx.c:2412
int t4_tx_start_page(t4_tx_state_t *s)
Prepare to send the next page of the current document.
Definition: t4_tx.c:2782
tz_t * tz
Optional per instance time zone for the FAX page header timestamp.
Definition: private/t4_tx.h:153
int t4_tx_get(t4_tx_state_t *s, uint8_t buf[], size_t max_len)
Get the next chunk of the current document page. The document will be padded for the current minimum ...
Definition: t4_tx.c:2761
int t4_tx_release(t4_tx_state_t *s)
End the transmission of a document. Tidy up and close the file. This should be used to end T...
Definition: t4_tx.c:2942
bool header_overlays_image
True for FAX page headers to overlay (i.e. replace) the beginning of the page image. False for FAX page headers to add to the overall length of the page.
Definition: private/t4_tx.h:138
int start_page
The first page to transfer. -1 to start at the beginning of the file.
Definition: private/t4_tx.h:131
t4_tx_state_t * t4_tx_init(t4_tx_state_t *s, const char *file, int start_page, int stop_page)
Prepare for transmission of a document.
Definition: t4_tx.c:2881
int t4_tx_get_tx_resolution(t4_tx_state_t *s)
Get the X and Y resolution code of the current page.
Definition: t4_tx.c:2418
int t4_tx_restart_page(t4_tx_state_t *s)
Prepare the current page for a resend.
Definition: t4_tx.c:2860
Definition: private/t4_tx.h:115
void t4_tx_set_local_ident(t4_tx_state_t *s, const char *ident)
Set the identity of the local machine, for inclusion in page headers.
Definition: t4_tx.c:2591
int t4_tx_get_tx_x_resolution(t4_tx_state_t *s)
Get the column-to-column (x) resolution of the current page.
Definition: t4_tx.c:2424
int t4_tx_get_tx_y_resolution(t4_tx_state_t *s)
Get the row-to-row (y) resolution of the current page.
Definition: t4_tx.c:2430
int stop_page
The last page to transfer. -1 to continue to the end of the file.
Definition: private/t4_tx.h:133
void t4_tx_set_header_tz(t4_tx_state_t *s, tz_t *tz)
Set the header timezone.
Definition: t4_tx.c:2603
void t4_tx_set_header_info(t4_tx_state_t *s, const char *info)
Set the header info.
Definition: t4_tx.c:2597
int t4_tx_image_complete(t4_tx_state_t *s)
Return the next bit of the current document page, without actually moving forward in the buffer...
Definition: t4_tx.c:2696
int t4_tx_set_tx_image_format(t4_tx_state_t *s, int supported_compressions, int supported_image_sizes, int supported_bilevel_resolutions, int supported_colour_resolutions)
Auto-select the format in which to send the image.
Definition: t4_tx.c:1902
int t4_tx_end_page(t4_tx_state_t *s)
Complete the sending of a page.
Definition: t4_tx.c:2868
Definition: private/timezone.h:81
void t4_tx_set_min_bits_per_row(t4_tx_state_t *s, int bits)
Set the minimum number of encoded bits per row. This allows the makes the encoding process to be set ...
Definition: t4_tx.c:2553
int t4_tx_get_pages_in_file(t4_tx_state_t *s)
Get the number of pages in the file.
Definition: t4_tx.c:2609
Definition: private/logging.h:33
int t4_tx_get_tx_image_width(t4_tx_state_t *s)
Get the width of the encoded data.
Definition: t4_tx.c:2436
int t4_tx_next_page_has_different_format(t4_tx_state_t *s)
Check for the existance of the next page, and whether its format is like the current one...
Definition: t4_tx.c:1846
void t4_tx_set_header_overlays_image(t4_tx_state_t *s, bool header_overlays_image)
Set page header overlay mode.
Definition: t4_tx.c:2585
int t4_tx_get_current_page_in_file(t4_tx_state_t *s)
Get the currnet page number in the file.
Definition: t4_tx.c:2625
int t4_tx_get_tx_image_width_code(t4_tx_state_t *s)
Get the width code of the encoded data.
Definition: t4_tx.c:2442
void t4_tx_get_transfer_statistics(t4_tx_state_t *s, t4_stats_t *t)
Get the current transfer statistics.
Definition: t4_tx.c:2631
int t4_tx_get_tx_compression(t4_tx_state_t *s)
Get the compression for the encoded data.
Definition: t4_tx.c:2406
int t4_tx_get_bit(t4_tx_state_t *s)
Get the next bit of the current document page. The document will be padded for the current minimum sc...
Definition: t4_tx.c:2737
int t4_tx_set_row_read_handler(t4_tx_state_t *s, t4_row_read_handler_t handler, void *user_data)
Set the row read handler for a T.4 transmit context.
Definition: t4_tx.c:1864
void t4_tx_set_max_2d_rows_per_1d_row(t4_tx_state_t *s, int max)
Set the maximum number of 2D encoded rows between 1D encoded rows. This is only valid for T...
Definition: t4_tx.c:2569
int(* t4_row_read_handler_t)(void *user_data, uint8_t buf[], size_t len)
Definition: t4_tx.h:34