Wrong colors during printing (hpcups)

Bug #695962 reported by Oldřich Jedlička on 2010-12-31
This bug affects 4 people
Affects Status Importance Assigned to Milestone

Bug Description

The bug is similar to bug #675936, but on normal PC (little endian). Only some colors are wrong - see the test page result. The color wheel is wrong and the HP logo is wrong too (black background).

I have HP Photosmart Premium all-in-one (310a), hplip-3.10.9 and cups-1.4.5.

Oldřich Jedlička (oldium-pro) wrote :
Oldřich Jedlička (oldium-pro) wrote :
Oldřich Jedlička (oldium-pro) wrote :

I cannot use the printing, because the printed pages are with black background (like the HP logo on the test page has).

Please run "hp-levels" output and paste the output.

Naga Samrat Chowdary, Narla

Oldřich Jedlička (oldium-pro) wrote :

can you please provide the cups error_log messages and raster file generated by cups?
please do the following steps the provide us the output

follow the step 4 under CUPS error_log at https://wiki.ubuntu.com/DebuggingPrintingProblems
in the same file put hpLogLevel 15 under "LogLevel" and restart cups.

not give single page printout.
go to /tmp directory and attach the .bmp and .out files.
also please attach cups error_log and access_log in / var/log/cups directory

Naga Samrat Chowdary, Narla

Oldřich Jedlička (oldium-pro) wrote :
Oldřich Jedlička (oldium-pro) wrote :

CUPS is generating raster file with wrong color wheel.
this is not an issue from HPCUPS or HPLIP.
Please try by updating CUPS from synaptic package manager and try again.
You can also log this defect at www.cups.org.

Thanks for your Report.
Naga Samrat Chowdary, Narla

Changed in hplip:
status: New → Invalid

Ok and thanks for your help :-)

Changed in hplip:
status: Invalid → New

I'm reopening this bug, because I've found the problem source.

  1. The written raster files from hplip do not correspond exactly to the input data, the data are changed (so you cannot trust the generated bmp files).
  2. The ghostscript-gpl-9.0 had a problem, so the raster was really broken (confirmed by rasterview).
  3. With the SVN trunk version of ghostscript-gpl the raster file looks much better, but the printing is still bad.

So here is what I've found. The raster file generated by latest ghostscript is in RGBW (or it at least says so). The color is then corrected by the formula R'=R-(255-W), same for G' and B'. The current problem is that the value of R' is negative, so for unsigned calculations the result is wrong - there is arithmetic overflow.

I have a small patch that fixes the problem, but I think there is something wrong with the raster data anyway - the black just isn't black in RGB part (it is lighter). Also the printed color wheel isn't rounded good - look at the Magenta part. Please heave a look at attachments.

I'm not sure about the patch and the Mac OS part, the Mac OS part looks weird to me anyway :-)

I've tested the patch on Gentoo Linux, ghostscript-gpl from SVN trunk (with the same patches that Gentoo had for 9.00), cups-1.4.6 and hplip-3.10.9 (patched with above patch)

I'm still not happy with the colors - the Gray Ramp is totally black too early and the Color Wheel isn't a "wheel".

TangQiang (tangqiangcs) wrote :

Hello,Oldřich Jedlička
     I got the same problem like yours. And I work on it for about 7 days. and now my printers(PhotoSmart C4599, PhotoSmart D110) work well.
     I just carefully read the HPLIP configure options. And my configure command is “./configure –enable hpijs-install –enable-foomatic-ppd-install –enable –enable-foomatic-drv-install –enable-foomatic-rip-hplip-intall”. I see your check out, I think the problem is you just run the command just like “./configure”, and then “make” , “make install”. After “make” and “make install ”,you can use your firfox to visit “localhost:631”,then find your new printer, and you shoud choose model like “HP PhotoSmart c 4500 series hpijs,”. Then you can print the test page.
    Wish you good luck!!

TangQiang (tangqiangcs) wrote :

Sorry, I found some spelling issues in my command of configuration. Actually the command is
“./configure –enable-hpijs-install –enable-foomatic-ppd-install –enable-foomatic-drv-install –enable-foomatic-rip-hplip-intall” .

I have exactly the same problem with a HP Officejet 6000 using hpcups, openSUSE 11.4 (i586), cups 1.4.6 and hplip-3.11.3a. Switching to hpijs solves the problem for me too.

goutam kodu (goutam-hplip) wrote :


Latest hplip-3.11.5 is released now. Which has support for OpenSUSE 11.4 and the patch for the wrong color printing. You can find the same at http://hplipopensource.com/hplip-web/gethplip.html. Please upgrade the ghostscript version to the latest and install hplip-3.11.5 and let us know if you still find the issue.

Thanks for using HPLIP.

Thanks & Regards,
Goutam Kodu

Using hplip-3.11.5 plus ghostscript 9.02 fixed the wrong colors for me. Thanks a lot!

Nevertheless the colors look a bit different comparing hpijs with hpcups (look at the magenta in the attached scan), but that's probably another issue.

I will try it too this week. I think that hpijs uses different color model than hpcups. Ghostscript didn't make any change in the area AFAIK, so I'm not surprised it is still not OK. At least now we have somehow usable print-outs.

For anybody interrested, the link to ghostscript bug is here:


Confirmed, the patch makes the printout usable. The colors are not perfect, though. But that isn't fault of HPLIP AFAICT.

Latest ghostscript-gpl git should have the issue fixed. I'm trying to get it running on my Gentoo, currently without much success, though...

Changing the status to Invalid as this is not the issue with HPLIP. It is the problem with ghostscript.

Changed in hplip:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.