[gs-bugs] [Bug 691157] Problem with image masking

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Tue Oct 5 19:23:41 UTC 2010


http://bugs.ghostscript.com/show_bug.cgi?id=691157

Ray Johnston <ray.johnston at artifex.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michael.vrhel at artifex.com

--- Comment #9 from Ray Johnston <ray.johnston at artifex.com> 2010-10-05 19:23:40 UTC ---
As far as the requirement to "you will need to restore the gstate and extended
gstate to what they were at the time that execmaskgroup was first handled.",
it seems that this setting of the proper gstate+ExtGState can be done at the
start of the .execmaskgroup at:

/.execmaskgroup {    % <masknum> <paramdict> <formdict> .execmaskgroup -
    % Save our place in PDFfile. Do not use gsave-grestore when creating
    % a soft mask with .begintransparencygroup because high level devices
    % need to modify the graphic state by storing the soft mask ID.
    % Save the ExtGState (//nodict begin) BEFORE changing the colorspace
  mark currentcolor counttomark dup 4 add exch roll pop
  currentcolorspace 4 1 roll .getuseciecolor 4 1 roll //nodict begin

the '//nodict begin' would be replaced with a 'begin' to the saved dict
containing the ExtGState and a 'gsave setgstate' to the gstate that was saved
in gssmask.

Then the restoration of the states can be done at the end of .execmaskgroup:

  .setuseciecolor setcolorspace setcolor end    % restore colorspace, color and
ExtGState (end)
} bdef

The 'end' suffices to restore the ExtGState and we just need to add (AFAICT)
a 'grestore'.

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list