Summary: | ghostscript 8.62 fails with rangecheck on PDF files with x11alpha device | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Tor Andersson <tor.andersson> |
Component: | Other Driver | Assignee: | Hin-Tak Leung <htl10> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | christinedelight.top85, michael.vrhel |
Priority: | P4 | ||
Version: | 0.00 | ||
Hardware: | Macintosh | ||
OS: | MacOS X | ||
Customer: | Word Size: | --- | |
Attachments: | onepage.pdf |
Description
Tor Andersson
2008-03-05 05:58:06 UTC
Created attachment 3836 [details]
onepage.pdf
Simple one page PDF file that exhibits the bug.
I can reproduce with MacOS 10.4 (intel) and 64 bit linux. This issues is transparency related. It only occurs with the x11alpha device, and adding -dNOTRANSPARENCY avoids the blank page. Tor, can you confirm whether it renders correctly with other devices or -dNOTRANSPARENCY, or are there elements missing? Assigning to myself as an x11alpha bug. Ray traced the rangecheck to zdiscardtransparencygroup (ztrans.c:236) This dies due to an 'unknowerror' return from 'gx_no_get_bits' when trying to do a 'copy_alpha'. The current device is the pdf14RGB' device which doesn't have a 'get_bits' or 'get_bits_rectangle' function. The problem results when there is a bbox compositor in the chain. The pngalpha device, doesn't define a 'create_compositor' call, so the 'senpdf14_trans' never installs the bbox device in the compositor chain. The 'fill_with_rule' checks the bbox device's color_info.anti_alias and the value is '4' even though the underlying 'pdf14RGB' device has color_info.anti_alias set to '1'. Then 'gs_make_mem_abuf_device' is called leading (eventually to the failure). When the 'bbox' compositor is not in the chain, the pdf14RGB device's color_info anti_alias is seen by the 'fill_with_rule', so the 'abuf' device is not used. Note that this means that ALL transparency files currently 'fall back' to not using anti-aliased rendering (the effect is visible in the pgnalpha device and the windows 'display' device). I'm not yet sure of the 'best' fix. We obviously would like to retain anti- aliased text for the x11alpha device, but this has to default to AlphaBits=1 when a PDF with transparency is encountered. Note that the -sDEVICE=x11 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 works this way (non transparency pages are anti-aliased, pages with transparency are not). Follow up. The difference is that the x11alpha device's prototype (which is used by the bbox_create_compositor) when it calls gx_device_init from gx_device_bbox_init has the anti_alias bits set to '4' (using the std_device_dci_alpha_type_body macro). The x11 device prototype doesn't have these set. One solution might be to set the anti_alias values _after_ the bbox compositor is installed in the chain (when the device is the x11alpha device). Grabbing a Ralph's bugs. still a problem with r11213 . fixed with rev 12380 |