DynaPDF Manual - Page 508

Previous Page 507   Index   Next Page 509

Function Reference
Page 508 of 787
Embedded ICC profiles
JPEG images can contain embedded ICC profiles but PDF readers ignore such profiles. However,
DynaPDF can extract the embedded ICC profile to create an ICC based color space for the image. To
enable the usage of embedded ICC profiles set the flag gfUseImageColorSpace with SetGStateFlags().
See also Color Spaces and Images. The embedded ICC profile will be removed from the image
stream so that no unnecessary data must be stored in the PDF file.
Note that embedded ICC profiles will not be removed if real pass-through mode is enabled.
Especially embedded CMYK profiles are very large and should be removed if possible. Real
pass-through mode should be disabled in this case.
Optimized Huffmann encoding
Images are compressed with optimized Huffmann tables if the current compression level is set to
clMax (see SetCompressionLevel()). This level produces better compression ratios without loosing
quality. However, the optimized compression method is minimal slower than the normal one.
JPEG images are inserted in path-through mode if either the property SetSaveNewImageFormat() is
set to false (default = true) or if no further conversion or downscaling is required.
JPEG 2000 (Experimental)
JPEG 2000 is a compression method that supports loss-less and lossy compression. JPEG 2000
images support alpha transparency but most image viewers discard the alpha channel. This can lead
to diffent results since DynaPDF considers the alpha channel by default. The alpha channel can be
ignored if necessary by setting the flag gfNoBitmapAlpha with SetGStateFlags().
JPEG 2000 compression achieves very good compression rates for color and gray scale images. It can
be used with all color depths and supported color spaces.
The loss-less variant is used if the JPEG quality is set to 0 or 1000 (see below). However, the
compression ratio of loss-less JPEG 2000 compression is not very high and Flate compression
produces mostly much better compression ratios and it is up to 30 times faster.
The lossy variant of JPEG 2000 compression supports two different compression methods: Real-
Mode and Integer-Mode, which produces slightly different output at high compression rates. The
resulting image looks slightly smoother if Real-Mode is used. The compression method can be
adjusted with SetCompressionLevel(). The Real-Mode is used if the compression level is set to
clMax, otherwise the Integer-Mode is used. However, the compression level does not change the
compression ratio in this case.
The compression ratio can be adjusted with SetJPEGQuality(). The name "JPEG Quality" refers
normally to the JPEG compression filter, however, the value has a completely different meaning
when using JPEG 2000 compression.
The property JPEG quality can be in the range from 0 to 1000, but it does not adjust the loss of
quality; it is used as a divisor of the raw uncompressed image data size to the wished compressed
 

Previous topic: CCITT Fax G3/4, JBIG2, JPEG Encode, Real pass-through mode

Next topic: Pass-through mode, Why does DynaPDF not support LZW compression?, TIFF images

Start Chat