Closed
Bug 129655
Opened 22 years ago
Closed 22 years ago
[ps] PostScript module device depth is 1bit
Categories
(Core :: Printing: Output, defect)
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: roland.mainz, Assigned: roland.mainz)
References
()
Details
Attachments
(1 file)
1021 bytes,
patch
|
dcone
:
review+
attinasi
:
superreview+
|
Details | Diff | Splinter Review |
I found a longstanding issue in the PostScript module: The device depth is always 1bit instead of 24bit(8bit per R,G,B) - this may screw-up some things...
Assignee | ||
Comment 1•22 years ago
|
||
Fix in bug 119491 ...
Assignee | ||
Comment 2•22 years ago
|
||
See http://lxr.mozilla.org/seamonkey/source/gfx/src/ps/nsDeviceContextPS.cpp#139
Assignee | ||
Comment 3•22 years ago
|
||
Moved the fix into bug 126799 ...
Comment 4•22 years ago
|
||
I would like to make a couple comments. 1.) I would like the patch for this bug.. to be placed by itself in this bug, not as part of another patch. Its a better way to keep track of this issue, and what was done to solve this issue. 2.) If you would like.. I would like to fix this bug, because I dont fully understand what it means to set the depth to something besides 1 bit deep for postscript. Printers are mostly 1 bit deep.. and even if you have a printer that is not.. I dont know how this parameter would effect that output. I think that paremater is more something used for buffers, calculating row distances, memory, etc, I dont really know how postscript is using that at this moment. 3.) If you do fix this.. I would require that I review this.. I am the owner of the postscript stuff and I want to make sure we dont have any unessisary regressions, or at least I want to keep track of this issues that effect postscript. 4.) What is your take on the depth, and how do you think the PS module should use it, and what things are you talking about that may get screwed up.
Assignee | ||
Comment 5•22 years ago
|
||
dcone@netscape.com wrote: > I would like to make a couple comments. > > 1.) I would like the patch for this bug.. to be placed by itself in this bug, > not as part of another patch. Its a better way to keep track of this issue, ;-(( OK, I'll take the "fix" (=one line) out of bug 126799... > and what was done to solve this issue. The fix is to change "depth = 1" to "depth = 24" - that's all. > 2.) If you would like.. I would like to fix this bug, because I dont fully > understand what it means to set the depth to something besides 1 bit deep for > postscript. Printers are mostly 1 bit deep.. and even if you have a printer > that is not.. I dont know how this parameter would effect that output. I > think that paremater is more something used for buffers, calculating row > distances, memory, etc, I dont really know how postscript is using that at > this moment. The (future) problem will be SVG - our ScaleableVectorGraphics support. Currently it simply crashes cause it lacks support for 1bit devices (actually the PostScript module code itself assumes that it is fed with 24bit RGB data but annouces itself that it is a 1bit device...)... > 3.) If you do fix this.. I would require that I review this.. I am the owner > of > the postscript stuff and I want to make sure we dont have any unessisary > regressions, or at least I want to keep track of this issues that effect > postscript. Sure. > 4.) What is your take on the depth, and how do you think the PS module should > use it, and what things are you talking about that may get screwed up. See above. Code which looks at the device depth and adjust itself based on that value will go nuts (like our SVG code) ...
No longer depends on: 126799
Assignee | ||
Comment 6•22 years ago
|
||
Assignee | ||
Comment 7•22 years ago
|
||
dcone - can you r= the patch, please ?
Comment 8•22 years ago
|
||
Comment on attachment 76061 [details] [diff] [review] Patch for 2002-03-23-08-trunk sr=attinasi (aaahhh, nice and easy)
Attachment #76061 -
Flags: superreview+
Comment 9•22 years ago
|
||
are we always 24 bit.. what about on black and white printers.. are we 8 bit deep there, since its indexed?
Assignee | ||
Comment 10•22 years ago
|
||
dcone wrote:
> are we always 24 bit.. what about on black and white printers.. are we 8 bit
> deep there, since its indexed?
The data returned by |GetDepth()| is the depth we accept, not the depth we
output. nsDeviceContextPS always wants 24bit RGB as input.
Comment 11•22 years ago
|
||
r=dcone. I dont think at this time its bad to have 24 bit returned.. but I think its important to keep discussing how to use this depth correctly. The Depth is what is supported by the Device represented by the DeviceContext. So for example if a routine asked for the depth of the device, that routine can use a depth for a "blend" that is appropriate for that device. So my question .. is 24 bit always appropriate, or are there times it should be 8 bit, or even 1 bit. If we are going to output an image that is optimized for a printer, let say and 8 bit color indexed printer... I think that 8 bit should be returned so a pallete could be optimized so and optimized halftone of that output image could be generated. If we had a super duper color photo printer 24 bit would be appropriate. Or if we had a black and white printer, a depth of 1 bit would be important so we could do a halftone thats better than the ordered dither used by postscript.
Comment 12•22 years ago
|
||
Comment on attachment 76061 [details] [diff] [review] Patch for 2002-03-23-08-trunk r=dcone
Attachment #76061 -
Flags: review+
Assignee | ||
Comment 13•22 years ago
|
||
dcone: Mozilla does not have any special support for 8bit/1bit displays. For example on Linux/Unix we use the GDK/GTK+ libraries which only offer a static, hardcoded palette (which is very worse compared to what NS4.x can do with it's dynamic palette change code, but those people do not care about palette displays anyway... ;-( ) and is fed with 24bit RGB data. Same applies to the PostScript module... the current code always expects 24bit RGB data - feeding anything else just causes a crash... ;-(
Comment 14•22 years ago
|
||
but the DeviceContext is a virtual device.. so it supports what we say. If GTK supports only a limited number of colors.. it handles that. Postscript is not limited to GTK. For example.. I might want to output PostScript on a device that is a high end printer.. then 24 bit is appropriate.. if I wanted to do advanced halftones.. 1 bit or 8 bit is appropriate.... it tells the nsImage that we have certain capabilites in this DeviceContext. I think its a mistake to limit how this is used.. and better to use this to reflect the true depth of a device.. its representing.
Assignee | ||
Comment 15•22 years ago
|
||
dcone: OT: Does PostScript Level 2 (or level 3) support 8bit palette-indexed images ?
Assignee | ||
Comment 16•22 years ago
|
||
Patch checked in (http://bonsai.mozilla.org/cvsquery.cgi?module=MozillaTinderboxAll&branch=HEAD&cvsroot=/cvsroot&date=explicit&mindate=1019824680&maxdate=1019825760&who=peterv%25netscape.com), marking bug as FIXED.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 17•22 years ago
|
||
Roland please verify...thanks..
You need to log in
before you can comment on or make changes to this bug.
Description
•