Bug 689290 - An image with a soft mask gets invisible.
Summary: An image with a soft mask gets invisible.
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Color (show other bugs)
Version: master
Hardware: PC All
: P2 normal
Assignee: Ken Sharp
URL:
Keywords: bountiable
Depends on:
Blocks:
 
Reported: 2007-06-20 16:17 UTC by Alex Cherepanov
Modified: 2012-04-12 17:13 UTC (History)
2 users (show)

See Also:
Customer: 581
Word Size: ---


Attachments
Patch for Bug689290 (1016 bytes, patch)
2011-05-20 19:37 UTC, Shailesh Mistry
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Cherepanov 2007-06-20 16:17:53 UTC
This bug tracks the missing image on the sample PDF file
from the bug 689272. The image comes from the object 19 0,
which is an image with a soft mask. If the soft mask key is
removed, the image reappears.
Comment 1 Alex Cherepanov 2007-06-20 16:22:09 UTC
Please get the sample file from the bug 689289, not 689272 as stated above.
Comment 2 Henry Stiles 2007-10-16 13:19:11 UTC
reassigning to image owner.
Comment 3 Ralph Giles 2008-05-20 16:37:45 UTC
Assigning to Michael in case it's related to 688601.

I actually see two issues. There's a pale background image missing under the
text at the upper left, and there are black dropouts in the letters in the lower
right image that are blue in evince.
Comment 4 Michael Vrhel 2008-08-18 17:01:13 UTC
Making some progress on this one.  It does not, at this point, appear to be an
issue with respect to the Smask and the graphic state like the other smask
issues that I have run into.  In this particular case, the Smask is defined
within the image object and we are creating the transparency group after we push
and pop the transparency group mask, as the code was designed.  Oddly though,
when the image is drawn (after creating the transparency group), no rectangles
are put into the pdf14 buffer.  Looking into why. 
Comment 5 Michael Vrhel 2008-08-18 21:24:28 UTC
The missing image is given as object 19 below with the 1-bit smask image.  As I
said above, the transparency code seems to be working correctly.  During the
push of the smask, image_render_simple uses copy portrait to copy the smask data
in object 20 to the PDF14 device.  Then, the pop mask occurs and a push of a
transparency group occurs.  The rendering of the image data of the 100Wide by
67High image data in object 19 should then occur.  This image is handled as a
image type 3x.  It seems to contain a mask of its own which is also a 1x1 like
the image in object 20.  This is sent to a memory device using
image_render_simple.  For some reason, it never seems to do anything with the
real image data, but flushes and moves on.  At one point, the renderer is set up
as image_render_color, but it never uses it.  It seems that one it finishes up
with the tiny mask associated with the image type 3x it cleans up and moves on. 

19 0 obj
<<
  /Subtype /Image
  /Width 100
  /Height 67
  /ColorSpace /DeviceRGB
  /BitsPerComponent 8
  /SMask 20 0 R
  /Length 17359
  /Filter /FlateDecode
>>
stream

IMAGE DATA

endstream
endobj

20 0 obj
<<
  /Subtype /Image
  /Width 1
  /Height 1
  /ColorSpace /DeviceGray
  /BitsPerComponent 1
  /Decode [ 0.7 0 ]
  /Length 1
>>
stream
.endstream
endobj
Comment 6 Ralph Giles 2009-06-09 10:23:19 UTC
Still reproducible with r9781, post smask merge.
Comment 7 Shailesh Mistry 2011-05-20 19:37:32 UTC
Created attachment 7522 [details]
Patch for Bug689290
Comment 8 Shailesh Mistry 2011-07-22 20:25:10 UTC
Bug still reproducible in Ghostscript 9.03
Comment 9 Ken Sharp 2011-08-17 07:34:43 UTC
Taking ownership for now, I will review the patch and make further comment if required.
Comment 10 Ken Sharp 2011-08-18 07:39:47 UTC
The patch looks good to me. I've done a cluster regression test, and it seems fine. The test shows differences with the pdfwrite device and fts_26_2604.pdf, but I'm not sure why. However the differences are indetectable visually so I'm not going to worry about them.

Thanks for the patch Shelly, sorry this has taken so long to work through.