Summary: | PDF file mis-rendered | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Marcos H. Woehrmann <marcos.woehrmann> |
Component: | PDF Interpreter | Assignee: | Robin Watts <robin.watts> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | CC: | henry.stiles |
Priority: | P2 | ||
Version: | master | ||
Hardware: | All | ||
OS: | All | ||
Customer: | 330 | Word Size: | --- |
Attachments: |
clipped_m_4.pdf
Simplified sample file. |
Description
Marcos H. Woehrmann
2010-02-18 09:07:35 UTC
Created attachment 5965 [details]
clipped_m_4.pdf
This file is a small portion of the customer supplied file, as such I do not
believe it needs to be marked private.
If this is a shading issue, please reassign to Michael Vrhel.
The 'm' shape is a clip path and is filled with:
q
/Perceptual ri
/GS0 gs
%Resolving: [17 0]
1182.33423 0 0 -1182.33423 483.75293 693.801758 cm
BX
/Sh0 sh
%Resolving: [20 0]
%Resolving: [19 0]
%Resolving: [18 0]
%Function: << /Bounds [] /Functions [<< /C1 [1.0] /C0 [0.0] /Domain [0.0 1.0]
/FunctionType 2 /N 1.0 >>] /Encode [0.0 1.0] /FunctionType 3 /
Domain [0.0 1.0] >>
%Resolving: [16 0]
%Resolving: [12 0]
<<
/Domain [
0.0 1.0 ]
/Filter /FlateDecode /FunctionType 4 /Length 91 /Range [
0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0 ]
>>
stream
%FilePosition: 2588
endobj
%Function: << /Filter /FlateDecode /Length 91 /Function {1.0 2 1 --roll-- 1.0 2
1 --roll-- 1.0 2 1 --roll-- 0 --index-- 1.0 --cvr-- --exch-- --sub-- 2 1
--roll-- 5 -1 --roll-- 1.0 --cvr-- --exch-- --sub-- 5 1 --roll-- 4 -1 --roll--
1.0 --cvr-- --exch-- --sub-- 4 1 --roll-- 3 -1 --roll-- 1.0 --cvr-- --exch--
--sub-- 3 1 --roll-- 2 -1 --roll-- 1.0 --cvr-- --exch-- --sub-- 2 1 --roll--
--pop--} /FunctionType 4 /File -file- /FilePosition 2588 /Domain [0.0 1.0]
/Range [0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0] >>
%Resolving: [15 0]
EX
Q
Created attachment 5966 [details]
Simplified sample file.
This is a regression. v.8.57 renders the file fine, v.8.60 has the same problem
as the HEAD.
r7982 | leonardo | 2007-05-16 17:04:35 -0400 (Wed, 16 May 2007) | 22 lines Fix (shadings) : Shorten a radial shading when it is larger than paint area. DETAILS : This partially improves performance for the test case of the bug 689189 "PDF fails with /unregistered in --shfill--". The test case includes multiple radial shadings, which are 100+ times larger than the path bbox. This patch replaces such shadings with a smaller shading, which paints the bbox with same color (a minor color difference is possible due to rounding errors). Fixed in: commit f92a542b0475a12f4724d3e57f232cafbe17ce50 Author: Robin Watts <Robin.Watts@artifex.com> Date: Mon Jun 6 21:00:41 2011 +0100 Bug 691118: Fix radial shading bug Bug 691118 describes a bug with radial shadings in a PDF file. Back in r7982 (git 69a43b0) (16 May 2007) Igor introduced some cunning code to speed radial shadings. It would spot that the shading was large in comparison with the area being filled, and produce a smaller, equivalent shading. Essentially, it would take the destination rectangle, and figure out where in the shading the 'extremes' of that rectangle would come from (allowing for distortion in shape generation) and ensure that the newly generated shading covered the same area. Either the corners of the rectangle could be extremes, or points on the side. The code for the points on the sides was broken due to a typo causing the X and Y cases to be switched. All that is required to solve the bug is to change the == to !=. In researching the problem however, I recommented lots of the code to make it more comprehensible (to me at least!) along with introducing some temporary variables to make it clearer and avoid needless recomputation of values. I am committing this as I believe it's a step forward for the code, even though it doesn't actually make a difference. 48 differences in non-pdfwrite/ps2write tests. 11 in pdfwrite, 17 in ps2write. Checked with bmpcmp, all unnoticable to the naked eye, so presumably progressions. |