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

Go to the source code of this file.

Classes

struct  fz_compression_params
struct  fz_compressed_buffer

Enumerations

enum  {
  FZ_IMAGE_UNKNOWN = 0 , FZ_IMAGE_RAW , FZ_IMAGE_FAX , FZ_IMAGE_FLATE ,
  FZ_IMAGE_LZW , FZ_IMAGE_RLD , FZ_IMAGE_BROTLI , FZ_IMAGE_BMP ,
  FZ_IMAGE_GIF , FZ_IMAGE_JBIG2 , FZ_IMAGE_JPEG , FZ_IMAGE_JPX ,
  FZ_IMAGE_JXR , FZ_IMAGE_PNG , FZ_IMAGE_PNM , FZ_IMAGE_TIFF ,
  FZ_IMAGE_PSD
}

Functions

fz_compressed_bufferfz_keep_compressed_buffer (fz_context *ctx, fz_compressed_buffer *cbuf)
size_t fz_compressed_buffer_size (fz_compressed_buffer *buffer)
fz_streamfz_open_compressed_buffer (fz_context *ctx, fz_compressed_buffer *)
fz_streamfz_open_image_decomp_stream_from_buffer (fz_context *ctx, fz_compressed_buffer *, int *l2factor)
fz_streamfz_open_image_decomp_stream (fz_context *ctx, fz_stream *, fz_compression_params *, int *l2factor)
int fz_recognize_image_format (fz_context *ctx, unsigned char p[8])
const char * fz_image_type_name (int type)
int fz_lookup_image_type (const char *type)
void fz_drop_compressed_buffer (fz_context *ctx, fz_compressed_buffer *buf)
fz_compressed_bufferfz_new_compressed_buffer (fz_context *ctx)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FZ_IMAGE_UNKNOWN 
FZ_IMAGE_RAW 
FZ_IMAGE_FAX 
FZ_IMAGE_FLATE 
FZ_IMAGE_LZW 
FZ_IMAGE_RLD 
FZ_IMAGE_BROTLI 
FZ_IMAGE_BMP 
FZ_IMAGE_GIF 
FZ_IMAGE_JBIG2 
FZ_IMAGE_JPEG 
FZ_IMAGE_JPX 
FZ_IMAGE_JXR 
FZ_IMAGE_PNG 
FZ_IMAGE_PNM 
FZ_IMAGE_TIFF 
FZ_IMAGE_PSD 

Function Documentation

◆ fz_compressed_buffer_size()

size_t fz_compressed_buffer_size ( fz_compressed_buffer * buffer)

Return the storage size used for a buffer and its data. Used in implementing store handling.

Never throws exceptions.

◆ fz_drop_compressed_buffer()

void fz_drop_compressed_buffer ( fz_context * ctx,
fz_compressed_buffer * buf )

Drop a reference to a compressed buffer. Destroys the buffer and frees any storage/other references held by it.

Never throws exceptions.

◆ fz_image_type_name()

const char * fz_image_type_name ( int type)

Map from FZ_IMAGE_* value to string.

The returned string is static and therefore must not be freed.

◆ fz_keep_compressed_buffer()

fz_compressed_buffer * fz_keep_compressed_buffer ( fz_context * ctx,
fz_compressed_buffer * cbuf )

Take a reference to an fz_compressed_buffer.

◆ fz_lookup_image_type()

int fz_lookup_image_type ( const char * type)

Map from (case sensitive) image type string to FZ_IMAGE_* type value.

◆ fz_new_compressed_buffer()

fz_compressed_buffer * fz_new_compressed_buffer ( fz_context * ctx)

Create a new, UNKNOWN format, compressed_buffer.

◆ fz_open_compressed_buffer()

fz_stream * fz_open_compressed_buffer ( fz_context * ctx,
fz_compressed_buffer *  )

Open a stream to read the decompressed version of a buffer.

◆ fz_open_image_decomp_stream()

fz_stream * fz_open_image_decomp_stream ( fz_context * ctx,
fz_stream * ,
fz_compression_params * ,
int * l2factor )

Open a stream to read the decompressed version of another stream with optional log2 subsampling.

◆ fz_open_image_decomp_stream_from_buffer()

fz_stream * fz_open_image_decomp_stream_from_buffer ( fz_context * ctx,
fz_compressed_buffer * ,
int * l2factor )

Open a stream to read the decompressed version of a buffer, with optional log2 subsampling.

l2factor = NULL for no subsampling, or a pointer to an integer containing the maximum log2 subsample factor acceptable (0 = none, 1 = halve dimensions, 2 = quarter dimensions etc). If non-NULL, then *l2factor will be updated on exit with the actual log2 subsample factor achieved.

◆ fz_recognize_image_format()

int fz_recognize_image_format ( fz_context * ctx,
unsigned char p[8] )

Recognise image format strings in the first 8 bytes from image data.