DynaPDF Manual - Page 551

Previous Page 550   Index   Next Page 552

Function Reference
Page 551 of 787
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. Images with a Separation color space are scaled in gray and the
original color space is restored after scaling.
Image size check
The function checks whether the new image is smaller as the original one. If no size reduction can be
achieved then the image is stored as is.
The size check can be disabled with the flag ofNoImageSizeCheck.
Images which were inserted with DynaPDF functions like InsertImage() will be ignored.
Masked images (color key masking)
Color key masking is a technique to make parts of an image transparent. This type of masking
depends on exact color values because a specific color is used to mask the transparent areas. If such
an image will be scaled, it is possible that the color of certain pixels will be changed due to color
interpolation and this can lead to visible differences which are maybe not acceptable.
To avoid issues with masked images it is recommended to set the flag ofSkipMaskedImages.
Hairline correction
If the member MinLineWidth of the structure TOptimizeParams is greater zero the line width of
stroked paths will be set to MinLineWidth if the scaled value was smaller. The function considers all
transformations of the coordinate system.
The line width is measured in PDF units. One PDF unit represents 1/72 inch.
The minimum line width should be smaller or equal 1.0. The maximum value is 10.0 units.
Depending on the used flags it is possible to correct real hairlines only (zero width lines), all lines
which are thinner than MinLineWidth, or all lines with exception of real hairlines (line width = 0).

Previous topic: Re-compressing 1 bit images with JBIG2, Text to outline conversion, Color conversion, Converting gray images to 1 bit (black & white)

Next topic: Possible issues, Special flags, Recommendations, Error handling

Start Chat