Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.0.6_P01
-
Fix Version/s: 5.1
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:any
-
Support Case References:Support Case #12907 - https://icesoft.my.salesforce.com/5007000000dugM6
Description
The file in question is using text outline clipping as a mask to an image. If -Dorg.icepdf.core.imageReference=smoothScaled is used the clip is incorrectly applied. This can be avoided with -Dorg.icepdf.core.imageReference=default but this will adversely affect other images.
We'll need to pass in a custom flag when applying outline clipping to avoid image scaling .
We'll need to pass in a custom flag when applying outline clipping to avoid image scaling .
An oversight on our part as the client is actually using the scaledImageReference and not the smoothScaledImageReference implementation. The scaledImageReferenced also suffered from the the sizing issue between the actual image and the image raster. scaledImageReference was reworked to calculate the image dimensions based on the new image that resulted from the image decode and not the image dimensions that are define in the image's dictionary.
For example a black images has a dictionary dimension of 2x2 and a masking image for example that is 300x120. After the decode the original 2x2 image has been scaled to the 300x120 so the masking could be properly applied. Now when the scaledImageReference scaling takes place 300x120 is used instead of erroneous 2x2 size.