mupdf
Loading...
Searching...
No Matches
band-writer.h File Reference
Include dependency graph for band-writer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fz_band_writer

Macros

#define fz_new_band_writer(C, M, O)

Typedefs

typedef struct fz_band_writer fz_band_writer
typedef void fz_write_header_fn(fz_context *ctx, fz_band_writer *writer, fz_colorspace *cs)
typedef void fz_write_band_fn(fz_context *ctx, fz_band_writer *writer, int stride, int band_start, int band_height, const unsigned char *samples)
typedef void fz_write_trailer_fn(fz_context *ctx, fz_band_writer *writer)
typedef void fz_close_band_writer_fn(fz_context *ctx, fz_band_writer *writer)
typedef void fz_drop_band_writer_fn(fz_context *ctx, fz_band_writer *writer)

Functions

void fz_write_header (fz_context *ctx, fz_band_writer *writer, int w, int h, int n, int alpha, int xres, int yres, int pagenum, fz_colorspace *cs, fz_separations *seps)
void fz_write_band (fz_context *ctx, fz_band_writer *writer, int stride, int band_height, const unsigned char *samples)
void fz_close_band_writer (fz_context *ctx, fz_band_writer *writer)
void fz_drop_band_writer (fz_context *ctx, fz_band_writer *writer)
fz_band_writerfz_new_band_writer_of_size (fz_context *ctx, size_t size, fz_output *out)

Macro Definition Documentation

◆ fz_new_band_writer

#define fz_new_band_writer ( C,
M,
O )
Value:
((M *)Memento_label(fz_new_band_writer_of_size(ctx, sizeof(M), O), #M))
fz_band_writer * fz_new_band_writer_of_size(fz_context *ctx, size_t size, fz_output *out)
#define Memento_label(A, B)
Definition memento.h:388

Typedef Documentation

◆ fz_band_writer

typedef struct fz_band_writer fz_band_writer

◆ fz_close_band_writer_fn

typedef void fz_close_band_writer_fn(fz_context *ctx, fz_band_writer *writer)

◆ fz_drop_band_writer_fn

typedef void fz_drop_band_writer_fn(fz_context *ctx, fz_band_writer *writer)

◆ fz_write_band_fn

typedef void fz_write_band_fn(fz_context *ctx, fz_band_writer *writer, int stride, int band_start, int band_height, const unsigned char *samples)

◆ fz_write_header_fn

typedef void fz_write_header_fn(fz_context *ctx, fz_band_writer *writer, fz_colorspace *cs)

◆ fz_write_trailer_fn

typedef void fz_write_trailer_fn(fz_context *ctx, fz_band_writer *writer)

Function Documentation

◆ fz_close_band_writer()

void fz_close_band_writer ( fz_context * ctx,
fz_band_writer * writer )

Finishes up the output and closes the band writer. After this call no more headers or bands may be written.

◆ fz_drop_band_writer()

void fz_drop_band_writer ( fz_context * ctx,
fz_band_writer * writer )

Drop the reference to the band writer, causing it to be destroyed.

Never throws an exception.

◆ fz_new_band_writer_of_size()

fz_band_writer * fz_new_band_writer_of_size ( fz_context * ctx,
size_t size,
fz_output * out )

◆ fz_write_band()

void fz_write_band ( fz_context * ctx,
fz_band_writer * writer,
int stride,
int band_height,
const unsigned char * samples )

Cause a band writer to write the next band of data for an image.

stride: The byte offset from the first byte of the data for a pixel to the first byte of the data for the same pixel on the row below.

band_height: The number of lines in this band.

samples: Pointer to first byte of the data.

◆ fz_write_header()

void fz_write_header ( fz_context * ctx,
fz_band_writer * writer,
int w,
int h,
int n,
int alpha,
int xres,
int yres,
int pagenum,
fz_colorspace * cs,
fz_separations * seps )

Cause a band writer to write the header for a banded image with the given properties/dimensions etc. This also configures the bandwriter for the format of the data to be passed in future calls.

w, h: Width and Height of the entire page.

n: Number of components (including spots and alphas).

alpha: Number of alpha components.

xres, yres: X and Y resolutions in dpi.

cs: Colorspace (NULL for bitmaps)

seps: Separation details (or NULL).