Harlequin RIP SDK
JPEG integration API

API to integrate external JPEG readers. More...

Files

file  jpegapi.h
 Header file defining the JPEG integration API.
 

Data Structures

struct  jpeg_callbacks
 Callback structure provided by the RIP to the JPEG implementation, for access to RIP memory handling and JPEG data source. More...
 
struct  jpeg_decode_params
 Structure defining any decode parameters defined for decoding the jpeg image. More...
 
struct  sw_jpeg_api_20190717
 JPEG api structure version 20190717. More...
 

Macros

#define JPEG_CALLBACKS_INIT   { sizeof(jpeg_callbacks), NULL, NULL, NULL, }
 Static/auto initialiser for empty jpeg_callbacks structure.
 

Typedefs

typedef struct jpeg_callbacks jpeg_callbacks
 Callback structure provided by the RIP to the JPEG implementation, for access to RIP memory handling and JPEG data source. More...
 
typedef struct jpeg_decode_params jpeg_decode_params
 Structure defining any decode parameters defined for decoding the jpeg image. More...
 

Detailed Description

API to integrate external JPEG readers.

This API is used by the Harlequin Core RIP when integrating platform-specific optimised JPEG decompression libraries. If the RIP skin registers an implementation of this API in RDR using class RDR_CLASS_API and type RDR_API_JPEG, and the /AlternateJPEGImplementations userparam is true, then the Core RIP will use the API to decode JPEG image data.

When an external JPEG reader is registered and configured, the core RIP will call the sw_jpeg_api_20190717::decompress_init() method before all other methods. If this succeeds, then the RIP will call sw_jpeg_api_20190717::decompress_read() multiple times to read data from the JPEG decoder. When this method either indicates an error, or indicates that no bytes were available, the RIP will call sw_jpeg_api_20190717::unconsumed_byte_count() to get the number of bytes in the buffer provided that the decoder did not consume. Finally, the RIP will call sw_jpeg_api_20190717::decompress_close() to clean up any allocations. This is called regardless of errors in the read method.

The core RIP registers an implementation of the JPEG API on startup that uses LibJPEG to decompress JPEG images using the LibJPEG integration API. Both libjpeg and libjpeg-turbo are integrated using this method. You may override this registration to use your own JPEG decompression code, or override the registration of the LibJPEG API to use a different version of LibJPEG. The JPEG integration API is deregistered when the core RIP is shutdown.

Typedef Documentation

◆ jpeg_callbacks

Callback structure provided by the RIP to the JPEG implementation, for access to RIP memory handling and JPEG data source.

The JPEG implementation should copy the callback pointers provided in this structure into its own memory, and use them to allocate and free memory required to decode the JPEG data, and access the raw compressed JPEG source data.

◆ jpeg_decode_params

Structure defining any decode parameters defined for decoding the jpeg image.

The JPEG implementation should copy the parameters provided in this structure into its own memory if needed for decoding.