Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353454 - app-text/ghostscript-gpl-9 problem with RGBW color model
Summary: app-text/ghostscript-gpl-9 problem with RGBW color model
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Printing (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Printing Team
URL: http://bugs.ghostscript.com/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 21:23 UTC by Oldrich Jedlicka
Modified: 2011-08-22 18:38 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Problem with color model as printed by hplip (hplip-new-ghostscript.jpeg,879.60 KB, image/jpeg)
2011-02-01 21:24 UTC, Oldrich Jedlicka
Details
hplip-testpage.png (hplip-testpage.png,665.19 KB, image/png)
2011-02-02 16:11 UTC, Timo Gurr (RETIRED)
Details
gentoo-gs-9.00.png (gentoo-gs-9.00.png,438.78 KB, image/png)
2011-02-17 13:43 UTC, Timo Gurr (RETIRED)
Details
gentoo-gs-9.00-r1.png (gentoo-gs-9.00-r1.png,452.76 KB, image/png)
2011-02-17 13:44 UTC, Timo Gurr (RETIRED)
Details
gentoo-gs-9.01.png (gentoo-gs-9.01.png,389.22 KB, image/png)
2011-02-17 13:44 UTC, Timo Gurr (RETIRED)
Details
black-on-white graphviz diagram (ghostscript-9.00) (printout.jpg,68.37 KB, image/jpeg)
2011-02-17 16:34 UTC, Alec Meyers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oldrich Jedlicka 2011-02-01 21:23:08 UTC
This is a continuation of a color model problem as reported in bug #341207.

The output isn't right due to arithmetic overflow in hplip, but is primarilly caused by ghostscript-gpl bug.

Patch for hplip to have at least some color printing is in

  https://bugs.launchpad.net/hplip/+bug/695962
Comment 1 Oldrich Jedlicka 2011-02-01 21:24:06 UTC
Created attachment 261289 [details]
Problem with color model as printed by hplip
Comment 2 Oldrich Jedlicka 2011-02-01 21:31:08 UTC
Just to finish the description. The problem is with printing. The ghostscript-gpl with the CUPS driver provides wrong raster file, which is then passed to hplip. This results in arithmetic overflows and wrongly printed colors - see attachment.
Comment 3 Timo Gurr (RETIRED) gentoo-dev 2011-02-02 16:11:17 UTC
Created attachment 261360 [details]
hplip-testpage.png

HPLIP Testpage printed using the following versions:

app-text/ghostscript-gpl-9.00-r1
net-print/cups-1.4.6
net-print/hplip-3.11.1-r2

Seems to look ok here.
Comment 4 Timo Gurr (RETIRED) gentoo-dev 2011-02-02 16:23:37 UTC
Not sure about the RGB option though, the standard seems to be sRGB for Color LaserJet printers, the options offered by CUPS/the hplip ppd are:

* Standard (sRGB)
* Luminous
* Photo
* Photo (Adobe RGB 1998)
* None
Comment 5 Oldrich Jedlicka 2011-02-02 21:59:32 UTC
Ok, I will check the latest packages too (tomorrow).
Comment 6 Oldrich Jedlicka 2011-02-03 05:44:06 UTC
(In reply to comment #5)
> Ok, I will check the latest packages too (tomorrow).

I had a quick look and the raster file looks much better with ghostscript-9.00-r1. I will have a look at the applied patches to see more. Still the Color Wheel and the HP logo is broken, but the rest looks (at the first sight) how it should be - RGB is part is white and the W part contains the drawing (from the RGBW color model). I will attach my test page print-out in the evening too.
Comment 7 Timo Gurr (RETIRED) gentoo-dev 2011-02-17 13:43:01 UTC
I could reproduce the issue with an ink printer connected via usb. Attached are the results using different ghostscript versions, latest one looking the worst..
Comment 8 Timo Gurr (RETIRED) gentoo-dev 2011-02-17 13:43:52 UTC
Created attachment 262829 [details]
gentoo-gs-9.00.png
Comment 9 Timo Gurr (RETIRED) gentoo-dev 2011-02-17 13:44:11 UTC
Created attachment 262831 [details]
gentoo-gs-9.00-r1.png
Comment 10 Timo Gurr (RETIRED) gentoo-dev 2011-02-17 13:44:28 UTC
Created attachment 262833 [details]
gentoo-gs-9.01.png
Comment 11 Oldrich Jedlicka 2011-02-17 13:55:21 UTC
Hm, there wasn't any update from Ghostscript developpers in the referenced bug report, so I'm not surprised it isn't fixed in 9.01.
Comment 12 Timo Gurr (RETIRED) gentoo-dev 2011-02-17 14:09:37 UTC
(In reply to comment #11)
> Hm, there wasn't any update from Ghostscript developpers in the referenced bug
> report, so I'm not surprised it isn't fixed in 9.01.

Indeed, but strange thing is that my testpage with 9.01 looks like yours with 9.00, while you got better results with 9.00-r1. -r1 just had upstream patches applied which are now in 9.01. I'll commit 9.01 later today, 9.xx won't go stable until this issue is resolved.
Comment 13 Alec Meyers 2011-02-17 16:29:02 UTC
Timo, could you *please* mask the non-working versions of Ghostscript?
Comment 14 Alec Meyers 2011-02-17 16:34:46 UTC
Created attachment 262845 [details]
black-on-white graphviz diagram (ghostscript-9.00)

Here's a printout I found, if it seems like not much of a problem...
Comment 15 Oldrich Jedlicka 2011-02-17 21:47:12 UTC
(In reply to comment #14)
> Created an attachment (id=262845) [details]
> black-on-white graphviz diagram (ghostscript-9.00)
> 
> Here's a printout I found, if it seems like not much of a problem...

This has been fixed in 9.00-r1/9.01 I think. Version 9.00 definitely wasn't able to render images correctly. This is clearly visible on the HP logo (image) on the test page, while the rest of the page (vector drawings) looks good.

When you tried to print scanned pages from PDF, print image from Gimp or _rasterized_ drawings from Inkscape, you had somehow inverted colors. This should be fixed.
Comment 16 Christian Loosli 2011-03-08 21:29:53 UTC
Sorry to tell you, but this is definitely not fixed in ghostscript 9.01. 

I have a HP B110 printer here, and I tried hplip 3.10.9-r1 and 3.11.1-r2. As soon as I use ghostscript 9.* the colors are wrong if I print a testpage via hplip or just any picture. As soon as I downgrade to ghostscript 8.71-r6 the problems are gone. The USE-Flags of hplip (hpjis, hpcups) didn't seem to affect this. 

Just tell me if you need more information regarding versions in use or similar. 

Kind regards, 

Christian
Comment 17 Oldrich Jedlicka 2011-03-09 06:03:49 UTC
(In reply to comment #16)
> Sorry to tell you, but this is definitely not fixed in ghostscript 9.01. 

I meant only the part with inverted images. There are still problems with colors, though (see attachment 262833 [details] that nicely shows the problem).
Comment 18 Oldrich Jedlicka 2011-08-01 19:59:09 UTC
Latest ghostscript-gpl git should have the issue fixed. I'm trying to get it running, currently without much success, though...
Comment 19 Timo Gurr (RETIRED) gentoo-dev 2011-08-10 11:06:08 UTC
Please retest with ghostscript-gpl-9.04.

(In the meantime using ghostscript-gpl-9.02 and cups-1.5_rc also worked for me printing a hplip testpage showing the right colors.)
Comment 20 Alexandre Ferreira 2011-08-14 02:55:00 UTC
Seeing same problem with ghostscript-gpl-9.04, cups-1.4.6-r21 and hplip-3.11.7. My HP Deskjet 3900 only prints in black and white.
Comment 21 Alexandre Ferreira 2011-08-14 06:20:55 UTC
It works with ghostscript-gpl-9.02, cups-1.4.6-r21 and hplip-3.11.7
Comment 22 Oldrich Jedlicka 2011-08-15 05:57:37 UTC
I've reopened the upstream bug and added information about the BW problem.
Comment 23 Oldrich Jedlicka 2011-08-15 06:02:14 UTC
The 9.04 problem is printed image in grayscale - to be precise. Only the W part of the RGBW image contains image data.
Comment 24 Oldrich Jedlicka 2011-08-16 05:55:26 UTC
The problem has been fixed in the current Git code (master branch).
Comment 25 Timo Gurr (RETIRED) gentoo-dev 2011-08-16 21:07:19 UTC
(In reply to comment #24)
> The problem has been fixed in the current Git code (master branch).

Fixed in ghostscript-gpl-9.04-r1. Huge thanks for taking care of this bug upstream and investing so much time in finding the root cause, greatly appreciated!
Comment 26 Oldrich Jedlicka 2011-08-17 05:31:45 UTC
(In reply to comment #25)
> (In reply to comment #24)
> > The problem has been fixed in the current Git code (master branch).
> 
> Fixed in ghostscript-gpl-9.04-r1. Huge thanks for taking care of this bug
> upstream and investing so much time in finding the root cause, greatly
> appreciated!

Version ghostscript-gpl-9.04-r1 generates the same output as Git master. Thanks!
Comment 27 Andrew Savchenko gentoo-dev 2011-08-17 17:24:25 UTC
ghostscript-gpl-9.04-r1 fails to build for me on ~x86 without SSE2 support, I opened new bug 379597 for this.

Version 9.02 builds well.
Comment 28 Oldrich Jedlicka 2011-08-22 18:38:48 UTC
There is one more commit upstream to fix color model changes.