Summary: | PDF 1.7 FTS: images incorrect | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Marcos H. Woehrmann <marcos.woehrmann> |
Component: | Images | Assignee: | Alex Cherepanov <alex> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | CC: | michael.vrhel, ray.johnston |
Priority: | P1 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | 532 | Word Size: | --- |
Attachments: |
Partial patch
experimental patch patch |
Description
Marcos H. Woehrmann
2010-07-22 06:52:47 UTC
This bug is caused by an image with opacity layer that cannot be processed correctly by Jasper. No hacking of the output stream Can restore the image. This includes experiments with DeviceN and tint transform functions. The pdf interpreter needs to detect SMaskInData true in the file. In this case, hastransparency should be true and the pdf14 device pushed. The image should be handled as a 3x type and the alpha channel will be interleaved with the image data. Jasper processes the file just fine, it is GS that is not using the alpha channel properly nor paying attention to the SMaskInData setting. The following files are also affected by this bug. fts_17_1700_a4.pdf fts_17_1701_a4.pdf Created attachment 6666 [details]
Partial patch
Skip opacity and unknown components during reading of image data.
This improves the image quality (compared to the previous state that
interpreted an opacity channel as yet another data sample) and serves
as a transition to full support of opacity.
The patch has been committed as a rev. 11637. Created attachment 6679 [details]
experimental patch
This is rather inefficient implementation of opacity in the image that
uses separate streams for the image data and opacity data. It also buffers
opacity data in an reusable stream. This patch is attached in hope that some
parts of the code may be usable.
Proper implementation should use GS extensions that permit interleaved
image and opacity data.
*** Bug 691516 has been marked as a duplicate of this bug. *** Created attachment 6824 [details]
patch
Implement /SMaskInData using images with /SMask and separate streams for the
mask and image data. This patch is essentially the same as the "experimental
patch" posted earlier with a few bug fixes. The interface to /JPXDecode filter
has changed. It takes now /Alpha parameter, which controls whether opacity or
image data stream is extracted.
Our /ImageType 103 seems to have issues and my attempts to use it directly
have failed.
The patch has been committed as a rev. 11845.
The commit introduces a PS error on pdfwrite device in fts_18_1805.pdf
and a few other files with the same image. However, this image has never
been combined with SMask before and the actual bug is likely to predate
the commit.
Current version is working wit both Jasper and Luratech libraries. Remaining issues are tracked as separate bugs. |