DynaPDF Manual - Page 574

Previous Page 573   Index   Next Page 575

Function Reference
Page 574 of 818
Special compression filter flags:
The compression filter members of the structure TOptimizeParms can be combined with the flags
cfPresLosslessFilter and cfPresLossyFilter to preserve the original compression filter. If both flags are
set, the image is compressed with the original compression filter.
The flags can be combined with a compression filter constant with a binary or operator:
Example (C/C++):
p.FilterGray = (TCompressionFilter)(cfFlate | cfPresLossyFilter);
If no compression filter constant is set, cfFlate is used as alternate filter.
Image size check
The flag ofNoImageSizeCheck is implicitely set if a color conversion flag is set. This makes sure that
images can be converted to another color space also if the new image becomes larger. This is usually
always the case when converting images to CMYK from a lower color space.
Converting gray images to 1 bit (black & white)
Gray images will be converted to 1 bit b&w if the flag ofConvertGrayTo1Bit is set. The flag is
considered only if the flag ofCompressWithJBIG2 is set or if the parameter Parms and the flag
ofScaleImages is set. The conversion of gray images to b&w is mainly useful for scanned faxes since
many scanners create gray images for b&w input.
Image scaling
If the flag ofScaleImages is set, the function scales imported images according to the settings in the
TOptimizeParams structure. The function distuingishes between 1 bit, gray, and color images. The
minimum resolution of the original image that must be reached before scaling is applied can be set
for these three image types independently.
The minimum resolution of 1 bit images should be around 50% higher than the destination
resolution because scaling of 1 bit images can cause significant loss of quality if the original
resolution is near the destination resolution.
The minimum resolution of gray and color images can be freely chosen. 1 means scale all images.
The function scales images only if the minimum resolution is greater zero.
Spot color spaces
Images wich use a spot color space like Separation, DeviceN and NChannel are scaled only if the
flag ofConvertAllColors ist set.
 

Previous topic: Color conversion, Color conversion rules, Overprinting, Recommended compression filters

Next topic: Image size check, Masked images (color key masking), Hairline correction, Possible issues, Special flags, Recommendations


Start Chat