|
| API_VERSIONED (sw_libpng_api, LIBPNG_API_VERSION) |
|
static void * | pngrast_alloc (size_t cbSize, HqBool fZero) |
| Allocate memory using MemAlloc, falling back on malloc if necessary. More...
|
|
static void | pngrast_free (void *pMem) |
| Release memory allocated by pngrast_alloc(). More...
|
|
static void PNGCBAPI | png_error_callback (png_structp png, png_const_charp error_msg) |
|
static void PNGCBAPI | png_warning_callback (png_structp png, png_const_charp warning_msg) |
|
static void *PNGCBAPI | png_malloc_callback (png_structp png, png_size_t size) |
|
static void PNGCBAPI | png_free_callback (png_structp png, png_voidp mem) |
|
static void PNGCAPI | png_longjmp_callback (jmp_buf jmpbuf, int val) |
|
static RASTER_result | PNG_RASTER_start (void *pJobContext, RasterDescription *rd, RASTER_handle *handlep) |
|
static RASTER_result | PNG_RASTER_write_data (void *pJobContext, RASTER_handle rh, RasterDescription *rd, void *data, int32 topline, int32 lines, int32 bytesperline, int32 channel) |
|
static RASTER_result | PNG_RASTER_finish (void *pJobContext, RASTER_handle *handlep, RasterDescription *rd, RASTER_result result) |
|
HqBool | PNG_RegisterHandlers (void) |
| Register the raster backend and event handlers. More...
|
|
PNG raster output file functions.
This file implements an example to output data from the core RIP as a PNG file.
API_VERSIONED |
( |
sw_libpng_api |
, |
|
|
LIBPNG_API_VERSION |
|
|
) |
| |
< The output device instance.
< File descriptor for output device.
< PS filename minus any device prefix.
< Exclusive-or for each channel for RGB
< Pixel-interleaved raster data
< W,H of raster data
< Output bytes per line in received raster.
< Number of channels
< Interleaving mode
static void* pngrast_alloc |
( |
size_t |
cbSize, |
|
|
HqBool |
fZero |
|
) |
| |
|
static |
Allocate memory using MemAlloc, falling back on malloc if necessary.
This routine will attempt to allocate memory using a normal malloc()
in the event of a failure when calling MemAlloc(). This behaviour is not generally desired, but is valid for the uses of this backend.
Align the memory allocation to 16 bytes, because Windows 64 requires the jmp_buf allocated in the PNG structure to be aligned. Extra space is allocated at the beginning of the memory block to hold header information (hidden to the caller) signifying which allocation method was used, and what the offset from the allocated pointer is.
- Parameters
-
cbSize | The number of bytes to allocate. |
fZero | If TRUE the memory is zeroed. |
- Returns
- A pointer to the allocated memory, or
NULL
on failure.