The rendering core by default will preserve image quality and draw images as they were intended by the original author. The only exception to this rule will occur if the JVM does not have enough memory to load an image, at which time the rendering core will try to compensate by scaling the image to a smaller size in an attempt to display the image using a smaller memory foot print.
The imaging core can be configured to scale images. Image scaling in some cases can reduce the amount of memory used by the rendering core but can also results in a lose of image quality. The following table describes the three different types of images scaling available in the imaging core.
The Image pool is a Map of the most recently used images. The pools size by default is setup to be 1/4 the heap size. So as the pool grows it will self trim to keep the memory foot print at the specified max. The max pool size can be specified by using the org.icepdf.core.views.imagePoolSize system property. The value is specified in MB. For system with a constrained memory foot print the image pool can also be turned off with the property org.icepdf.core.views.imagePoolEnabled=false, the default value is true.
Image masks are an image that is used to define transparent regions on a parent image. The masking image is often quite a bit larger then the parent image and as a result we scale by default the parent image to match the image mask. The process results in a higher quality image render but also uses significantly more memory. For systems with a constrained memory foot print the system property org.icepdf.core.imageMaskScale.quality=false can be used to scale the mask to the size of the smaller parent image and thus save memory but at the cost of image quality.
© Copyright 2017 ICEsoft Technologies Canada Corp.