Bug 690972 - pgmraw vs ppmraw behaves differently.
Summary: pgmraw vs ppmraw behaves differently.
Status: RESOLVED LATER
Alias: None
Product: GhostPCL
Classification: Unclassified
Component: PCL raster (show other bugs)
Version: unspecified
Hardware: PC Linux
: P5 normal
Assignee: Henry Stiles
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-02 12:49 UTC by Hin-Tak Leung
Modified: 2010-02-23 14:13 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hin-Tak Leung 2009-12-02 12:49:07 UTC
one black cell in ppmraw is rendered transparent.
Comment 1 Hin-Tak Leung 2009-12-02 12:53:46 UTC
Created attachment 5732 [details]
pxl data

generated from 468-01.ps with -sDEVICE=pxlmono, r10431 from Marcos.

comparing 
       pcl6 -sDEVICE=pgmraw -sOutputFile=...
and 
       pcl6 -sDEVICE=ppmraw -sOutputFile=...

one of the black cells is rendered transparent in pgmraw. (or one of the
transparent cells in pgmraw is rendered black in ppmraw, as the case may be).
Comment 2 Hin-Tak Leung 2009-12-02 12:54:31 UTC
Comment on attachment 5732 [details]
pxl data

derived from 468-01.ps
Comment 3 Hin-Tak Leung 2009-12-02 12:57:57 UTC
Created attachment 5733 [details]
side by side comparison

another file from Marcos - 
left is how it looks from the original ps, gs->ppmraw and X11, pcl6->ppmraw, 
middle is pcl6->pgmraw, 
right high-lights the position of the difference.
Comment 4 Hin-Tak Leung 2009-12-02 12:58:41 UTC
Comment on attachment 5733 [details]
side by side comparison

derived from 468-01.ps
Comment 5 Henry Stiles 2009-12-02 13:25:05 UTC
The ppmraw output is correct vs. the HP.  Generally pcl requires an RGB process
color model to produce completely accurate results, some non rgb devices
(wtsimdi) set up an rgb contone buffer exactly for this purpose, unfortunately
we do not have that feature for pgmraw or most non rgb devices.  So this isn't
really a bug, if we had extra cycles, not likely in the immediate future, it
would be interesting to explore what exactly goes wrong here. 
Comment 6 Henry Stiles 2009-12-02 13:32:34 UTC
Anticipating a response to comment #5, 1 bit per pixel monochrome is fine. 
pbmraw has a black box like ppmraw and unlike pgmraw.
Comment 7 Hin-Tak Leung 2009-12-02 13:47:22 UTC
I have a vague idea how this might happen - for most part in the pxl code,
tranparent is mapped to all 1's (white in RGB/8-bit gray) and setting the
white-is-transparent flag. This works okay when the other color is not white,
except when the other color is black. Somehow for a black/white all-0/all-1
combination, what-is-what is inverted somewhere inside ghotscript - 1 means
colorred-(black) and 0 means no color (white). Something like this, anyway.