DynaPDF Manual - Page 575
Previous Page 574 Index Next Page 576
Page 575 of 821
Image size check
The function checks whether the new image is smaller as the original one (except if a color
conversion flag is set). If no size reduction can be achieved then the image is stored unchanged. 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.
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).
Hairline correction does not always produce the expected result, e.g. lines which look like a stroked
path are in fact filled rectangles. It is also possible that a surrounding clipping path prevents a
visible change of the line width.
The flag ofDeletePrivateData can be set to delete private data objects from pages, templates, and
images. Private data objects are created by several applications. For example, Adobe's Photoshop or
InDesign write the original images or PDF pages into private data structures (depending on the
settings in these applications).
A normal PDF viewer does not understand this data and ignores it. Because such objects are often
very large it is recommended to delete useless private data.
Optimize can do a lot but not anything. For example, the function does not perform a duplicate
check for images, templates, and so on. Such a duplicate check is available when importing a PDF
Previous topic: Special compression filter flags:, Image size check, Converting gray images to 1 bit (black & white), Image scaling, Spot color spaces
Next topic: Error handling