Summary: | Black bits in output reading PDF file | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Marcos H. Woehrmann <marcos.woehrmann> |
Component: | PDF Interpreter | Assignee: | Robin Watts <robin.watts> |
Status: | NOTIFIED FIXED | ||
Severity: | normal | CC: | customer531 |
Priority: | P1 | ||
Version: | master | ||
Hardware: | PC | ||
OS: | All | ||
Customer: | 531 | Word Size: | --- |
Description
Marcos H. Woehrmann
2011-11-07 21:07:15 UTC
The file draws black rectangles with white image masks on top of them. All images in the file are 1 pixel high. 993.39 960.99 0.06 9.9 re f q 1 g 0 9.96 -0.12 0 993.48 960.96 cm /Im203 Do Q This file, as Alex says, draws a sequence of thin horizontal rectangles, then plots an image mask over them. Ghostscript is rendering each rectangle 2 pixel high (so it half overlaps the previous one) due to the proper postscript rule for filling pixels if any part of a pixel is touched. The images however are only being rendered 1 pixel high, and hence being erased as soon as the next rectangle is plotted. I am testing a fix for this now. Hi Robin, Thanks for the update. Looking forward to the fix! Fixed in commit: commit 83788c03875545d620e6885e4f5ab4af08f8f55b Author: Robin Watts <robin.watts@artifex.com> Date: Mon Nov 21 20:31:09 2011 +0000 Bug 692666: grid fit images. The file in bug 692666 draws many thin horizontal rectangles, then draws 1 pixel high images on top of each one. Current gs 'thickens' the rectangles (due to the 'any part of a pixel' rule), and they overwrite the previously drawn image - hence it appears black. The problem is thus that the images are not similarly stretched. Images are not supposed to use the "any part of a pixel" rule, where vectors are, but the fact this file works in acrobat would seem to contradict that. Instead we try a simple fix; if we are using the 'any part of a pixel' file (i.e. fill_adjust != 0), and we meet an ImageMask image that is either 1 pixel high, or 1 pixel wide, then we ensure that it is 'stretched' to completely fill any pixels that it touches. We specifically do NOT perform this stretching if we are in the process of rendering a glyph. This produces various rendering diffs, none that offensive. |