spandsp 3.0.0
|
#include <stdlib.h>
#include <inttypes.h>
#include <limits.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <time.h>
#include <memory.h>
#include <string.h>
#include "spandsp/stdbool.h"
#include "floating_fudge.h"
#include <tiffio.h>
#include <assert.h>
#include "spandsp/telephony.h"
#include "spandsp/alloc.h"
#include "spandsp/fast_convert.h"
#include "spandsp/logging.h"
#include "spandsp/saturated.h"
#include "spandsp/timezone.h"
#include "spandsp/t4_rx.h"
#include "spandsp/t4_tx.h"
#include "spandsp/t81_t82_arith_coding.h"
#include "spandsp/t85.h"
#include "spandsp/t42.h"
#include "spandsp/t43.h"
#include "spandsp/t4_t6_decode.h"
#include "spandsp/t4_t6_encode.h"
#include "spandsp/image_translate.h"
#include "spandsp/private/logging.h"
#include "spandsp/private/t81_t82_arith_coding.h"
#include "spandsp/private/t85.h"
#include "spandsp/private/t42.h"
#include "spandsp/private/t43.h"
#include "spandsp/private/t4_t6_decode.h"
#include "spandsp/private/t4_t6_encode.h"
#include "spandsp/private/image_translate.h"
#include "spandsp/private/t4_rx.h"
#include "spandsp/private/t4_tx.h"
Functions | |
int | image_translate_row (image_translate_state_t *s, uint8_t buf[], size_t len) |
Get the next row of a translated image. | |
int | image_translate_get_output_width (image_translate_state_t *s) |
Get the width of the image being produced by an image translation context. | |
int | image_translate_get_output_length (image_translate_state_t *s) |
Get the length of the image being produced by an image translation context. | |
int | image_translate_set_row_read_handler (image_translate_state_t *s, t4_row_read_handler_t row_read_handler, void *row_read_user_data) |
Set the row read callback routine for an image translation context. | |
int | image_translate_restart (image_translate_state_t *s, int input_length) |
image_translate_state_t * | image_translate_init (image_translate_state_t *s, int output_format, int output_width, int output_length, int input_format, int input_width, int input_length, t4_row_read_handler_t row_read_handler, void *row_read_user_data) |
Initialise an image translation context for rescaling and squashing a gray scale or colour image to a bi-level FAX type image. | |
int | image_translate_release (image_translate_state_t *s) |
Release the resources associated with an image translation context. | |
int | image_translate_free (image_translate_state_t *s) |
Free the resources associated with an image translation context. | |
int image_translate_free | ( | image_translate_state_t * | s | ) |
Free the resources associated with an image translation context.
s | The image translation context. |
References image_translate_release().
int image_translate_get_output_length | ( | image_translate_state_t * | s | ) |
Get the length of the image being produced by an image translation context.
s | The image translation context. |
Referenced by t4_tx_set_tx_image_format().
int image_translate_get_output_width | ( | image_translate_state_t * | s | ) |
Get the width of the image being produced by an image translation context.
s | The image translation context. |
image_translate_state_t * image_translate_init | ( | image_translate_state_t * | s, |
int | output_format, | ||
int | output_width, | ||
int | output_length, | ||
int | input_format, | ||
int | input_width, | ||
int | input_length, | ||
t4_row_read_handler_t | row_read_handler, | ||
void * | row_read_user_data | ||
) |
Initialise an image translation context for rescaling and squashing a gray scale or colour image to a bi-level FAX type image.
s | The image translation context. |
output_format | The type of output image |
output_width | The width of the output image, in pixels. If this is set <= 0 the image will not be resized. |
output_length | The length of the output image, in pixels. If this is set to <= 0 the output length will be derived automatically from the width, to maintain the geometry of the original image. |
input_format | The type of source image |
input_width | The width of the source image, in pixels. |
input_length | The length of the source image, in pixels. |
row_read_handler | A callback routine used to pull rows of pixels from the source image into the translation process. |
row_read_user_data | An opaque pointer passed to read_row_handler |
Referenced by t4_tx_set_tx_image_format().
int image_translate_release | ( | image_translate_state_t * | s | ) |
Release the resources associated with an image translation context.
s | The image translation context. |
Referenced by image_translate_free().
int image_translate_row | ( | image_translate_state_t * | s, |
uint8_t | buf[], | ||
size_t | len | ||
) |
Get the next row of a translated image.
s | The image translation context. |
int image_translate_set_row_read_handler | ( | image_translate_state_t * | s, |
t4_row_read_handler_t | row_read_handler, | ||
void * | row_read_user_data | ||
) |
Set the row read callback routine for an image translation context.
s | The image translation context. |
row_read_handler | A callback routine used to pull rows of pixels from the source image into the translation process. |
row_read_user_data | An opaque pointer passed to read_row_handler |