Bug 689247 - pdfwrite creates redundant shadings.
Summary: pdfwrite creates redundant shadings.
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 0.00
Hardware: PC Windows XP
: P4 enhancement
Assignee: Ken Sharp
URL:
Keywords:
: 689572 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-05-24 14:41 UTC by leonardo
Modified: 2013-11-26 08:23 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description leonardo 2007-05-24 14:41:23 UTC
Re-distilling Bug689189.pdf got 8000+ shadings from source 70 ones.
Comment 1 leonardo 2007-08-29 20:54:46 UTC
Passing to Ken since he handles pdfwrite from now.
Comment 2 Ken Sharp 2007-12-13 00:42:19 UTC
*** Bug 689572 has been marked as a duplicate of this bug. ***
Comment 3 Ken Sharp 2009-02-03 03:27:27 UTC
Seems that at present we have no way to know if use of a shading pattern is
initial or reuse. Each pattern seems to get its own unique ID, which means we
can't simply keep a cache and test IDs.

Looks like we need to cache patterns and their matrix, also the shading
dictionary associated with the pattern so that we can test new patterns to see
if we already have a stored copy.

Lots of work, prone to error....

However, there is nothing actually wrong with the current output except size and
performance, so altering to 'enhancement'.
Comment 4 Shailesh Mistry 2011-07-23 14:36:51 UTC
Enhancement still missing in Ghostscript 9.03
Comment 5 Ken Sharp 2013-11-26 08:23:51 UTC
Commit fe99ca5fd2e3b191a76c7f7d791b72f3603e9fea fixes this. The output file now only contains 106 shadings, and is 41% smaller than before.

Note that this fix also depends on the following commits:

90ec17f20be53db00fcbc2ada6931e7cc7b22b9e

cdd142387a04a6d7ea519838e15204c4d7c681d8