Harlequin RIP SDK

JPEG-specific Raster callback definitions. More...

#include "std.h"

Functions

void JPEG_SetImageQuality (int32 quality)
 Set the quality of the JPEG image produced. More...
 
HqBool JPEG_RegisterHandlers (void)
 Register the raster backend and event handlers. More...
 

Detailed Description

JPEG-specific Raster callback definitions.

Function Documentation

◆ JPEG_RegisterHandlers()

HqBool JPEG_RegisterHandlers ( void  )

Register the raster backend and event handlers.

Return values
TRUEif successful;
FALSEotherwise.

◆ JPEG_SetImageQuality()

void JPEG_SetImageQuality ( int32  quality)

Set the quality of the JPEG image produced.

Scale quantization tables to adjust image quality. Quality is 0 (worst) to 100 (best); default is 75 if this function is not called.

The quality value lets you trade off compressed file size against quality of the reconstructed image: the higher the quality setting, the larger the JPEG file, and the closer the output image will be to the original input. Normally you want to use the lowest quality setting (smallest file) that decompresses into something visually indistinguishable from the original image. For this purpose the quality setting should be between 50 and 95; the default of 75 is often about right. If you see defects at 75, then go up 5 or 10 counts at a time until you are happy with the output image. (The optimal setting will vary from one image to another.) A quality value of 100 will generate a quantization table of all 1's, minimizing loss in the quantization step (but there is still information loss in subsampling, as well as roundoff error). This setting is mainly of interest for experimental purposes. Quality values above about 95 are not recommended for normal use; the compressed file size goes up dramatically for hardly any gain in output image quality.

In the other direction, quality values below 50 will produce very small files of low image quality. Settings around 5 to 10 might be useful in preparing an index of a large image library, for example. Try quality 2 (or so) for some amusing Cubist effects. (Note: quality values below about 25 generate 2-byte quantization tables, which are considered optional in the JPEG standard.

Values outside the range 0-100 will be ignored and the default of 75 will be used.