Bug 91644 - High definition photos printing from KDE software : poor quality
Summary: High definition photos printing from KDE software : poor quality
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Editor-Print (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-19 07:45 UTC by tulear
Modified: 2022-01-18 06:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.6.0


Attachments
sample printing with 10/22 cvs (17.71 KB, image/jpeg)
2004-10-22 22:23 UTC, tulear
Details
Original file (359.89 KB, image/gif)
2004-10-22 23:23 UTC, tulear
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tulear 2004-10-19 07:45:03 UTC
Version:            (using KDE KDE 3.2.3)
Installed from:    Mandrake RPMs
OS:                Linux

I tried to print (canon i865 with turboprint drivers) digital photos  (1600*1200 pixels) from KDE applications - mandrake 10.1 - (konqueror,  digkam, kuishow ...) but result is not so good even choosing the best  printer definition (4800 dpi) : colors are fine but I can see pixels on  4"x6" or A4.     
    
It"s not a driver problem : printing from Gimp 2.0 (with same  driver) give me perfect results, as good as from Windows. It looks like KDE  applications have reduced the image resolution ? Could you confirm this ?  
   
If it's confirmed it"s pity because it would say we need to open Gimp to print High definition photos, not very user friendly ...

Thanks
Comment 1 Nicolas Goutte 2004-10-19 11:51:05 UTC
KDE applications uses Qt's PostScript support to print.

As Qt is a general programming library, it is not as specialized as Gimp to create correct printing of images.

Have a nice day!
Comment 2 Stephan Kulow 2004-10-19 12:03:18 UTC
I reassign to digikam devevelopers. It's the only app from your listed list that I considered having good print out as target
Comment 3 Mikolaj Machowski 2004-10-19 15:08:51 UTC
> I reassign to digikam devevelopers. It's the only app from your listed
> list that I considered having good print out as target

Sorry but that is bullshit. Reducing quality of photos is bad for _all_
applications.

Eg.
- How I can prepare something more advanced in KWord when photos suck?
- How I can print photo of my aunt cat in KMail/Kuickshow when print sucks?

Comment 4 Stephan Kulow 2004-10-19 16:11:09 UTC
Sorry, I was a bit misleading. I meant: if not even digikam can print photos, then who can? :)
Comment 5 tulear 2004-10-19 19:59:56 UTC
I had a discusion on Digikam mailing list => they told me to fill a KDE bug because it is a general kde problem (kprinter from kdelibs)

IMHO it should be a good thing to be able to print with good quality with at least from Digikam, but from any kde too (konqueror for example). Windows XP is not a model but regarding photos printing, it's really more user friendly : you don't have to think "which application do I need to use for printing" : double clic from file manager and you can print your photos ...
Comment 6 Renchi Raju 2004-10-20 18:54:29 UTC
it seems kprinter doesn't use printer resolution by default. you have to force it to do so. fix has applied in cvs to digikam and kipi-plugins (calendar and printwizard). can you guys please waste some more ink toner and test it out. 
Comment 7 Mikolaj Machowski 2004-10-22 11:13:12 UTC
> Sorry, I was a bit misleading. I meant: if not even digikam can print
> photos, then who can? :)
Sure. But Digikam isn't general photo management system. You have to
import there photo.
1: Digikam isn't core KDE app
2: User doesn't always have to use photo management program to print
   images. Eg. I made some tests and the same photo printed from OO.o
   has better quality than from KWord.

Comment 8 tulear 2004-10-22 22:22:33 UTC
I had somes problems but I managed to compile today's CVS (10/22) :-) I cannot say the result is a success ;-)) : printing a A4 give me some kind of big pixels, on 4x6", it's about the same but smaler, see attached file ... 

Printing still works as previously for other kde software ;-)
Comment 9 tulear 2004-10-22 22:23:25 UTC
Created attachment 8000 [details]
sample printing with 10/22 cvs
Comment 10 Renchi Raju 2004-10-22 22:28:32 UTC
what does the attached photo show? is it a scan of the printed image? do you have a sample of the original file?
Comment 11 tulear 2004-10-22 23:19:14 UTC
yes it's a scan of the result (A4 and 4x6), I'll post the original file (sea landscape)
Comment 12 tulear 2004-10-22 23:23:17 UTC
Created attachment 8001 [details]
Original file
Comment 13 Kurt Pfeifle 2004-10-23 05:42:02 UTC
I cannot confirm that supposed bug at all. I printed the file (attachment as linked below) 

 a) on a black+white Laserjet 8100 (once as PostScript, once as PCL). 
 b) as well as on a Color Laserjet (PostScript). 
 c) onto the screen as a "preview".

I didnt use the "Turboprint" driver for this (wouldnt be useful for the printers at my disposal). I printed directly from Konqueror, from Kuickshow, from Gwenview -- always using kprinter as the print dialog. My printout resolution was 600x600 dpi.

My KDE versions were: current HEAD (self-compiled), 3.3.1 (both on SUSE-9.1), 3.2.3 (on Knoppix-3.6). My CUPS versions were: 1.1.20 and 1.1.22rc1.

What does this proof? 

 1) the file is OK -- nothing weird with it.
 2) KDE, KDE applications or KDEPrint don't have the bug described here
    regarding printing of hi-res images.
 3) the standard CUPS filtering system chains work fine on this file:
    * printing as PostScript: JPEG --> (imagetops) --> (pstops) --> PostScript
    * printing as PCL: JPEG --> (imagetoraster) --> (rastertohp) --> PCL

It is hard to believe that the scan is similar what the printer spits out. That looks like a resolution of 6dpi instead of 600dpi.

The printfile is generated by the applications (mostly as PostScript). kprinter doesnt change that file by default (it can however run some "pre-filters" on it, if you explicitely select them). kprinter is just an interface to select print options. From the selected print options, kprinter constructs a commandline and passes the printfile and the commandline options to the underlying print system (mostly CUPS nowadays). CUPS uses its own or some third party filters to convert the printfile into a format that the printer can digest.

I think that bug can savely be closed. There is something seriously wrong with the submitter's system setup.

I invite him to come to one of the forums/newsgroups/mailing lists where CUPS and printing is discussed, and we'll troubleshoot the problem in his setup there:

 * Linuxprinting.org/: http://www.linuxprinting.org/forums.cgi (General group)
 * CUPS.org: http://www.cups.org/newsgroups.php (General group)

I most likely will be there and respond. But we need more details than was provided here:

 a) each single setting in the print dialogs he uses.
 b) the output of "grep cupsFilter /etc/cups/ppd/*.ppd".
 c) the output of "ls -l /usr/lib/cups/filter/".
 d) the output of "lpstat -p [his_printername]".
 e) the output of "lpstat -p [his_printername] -l".
 f) the exact versions of the software he has: CUPS, TurboPrint, gimp-print, 
    Gimp, KDE
Comment 14 tulear 2004-10-23 09:43:25 UTC
the wierd files I submited are the printing results using the cvs digikam version, not results concerning my initial complain ;-) With a fresh Mandrake install results are not so bad hopefully, but not as good as they should be ... 
- I'll post another scan to be more explicit
- I'll do other tests using another distro 
Comment 15 Renchi Raju 2004-10-24 01:33:19 UTC
ok. here's the deal. i got one of the digikam developers to print out some pictures from the image viewer print dialog (with varying resolution). the results have been decent (taking into consideration the fact that he had a bad bunch of ink toners). also changing the resolutions of the printers works correctly now, with the image quality being improved with the resolution of the printer being bumped up. a lot of kde applications print with the default resolution (screen resolution) which is 72dpi. a fix was committed to digikam and the kipi-plugins to make use of the printer resolution when available. 

you would need to check your setup and as kurt suggested, maybe join the linuxprinting forums to figure out whats wrong with the setup. 

note, we haven't been able to compare the output to gimp printouts because of me not having printer and not having a response to my request from anyone yet at the mailing lists.
Comment 16 Tom Albers 2004-11-01 23:50:08 UTC
*** Bug 92438 has been marked as a duplicate of this bug. ***
Comment 17 Dave 2004-11-25 10:20:30 UTC
I can confirm this issue also.  Print quality from digikam is very poor by default.

I have not reviewed the updated digikam CVS, but all I did to my digikam kipi plugins source code to fix the problem (before I found this bug report) was this:

In the file:
kipi-plugins-0.1-beta1/kipi-plugins/printwizard/frmprintwizard.cpp 

Line 293 was:
KPrinter printer;

Which, according to KDE doc's, creates a print job that defaults to an effective quality of your screen (about 72dpi) when printing, regardless of the dpi or quality mode of the printer.

If this is changed to:
KPrinter printer(true, QPrinter::HighResolution);

Printing takes significantly longer, but the quality is _much_ better. Although I would always want this on, printing could be painfully slow on older machines. It might be appropriate to have a "Print with High-Quality (slow)" checkbox in the print wizard that would trigger this option.

This same simple change might work well for other KDE apps that need to print in high quality.
Comment 18 lpetersen 2005-01-21 18:25:43 UTC
I can only second Dave's comment above: Having QPrinter::ScreenResolution as the *only* supported PrinterMode setting in an application for printing photos is not appropriate, IMHO. Even QPrinter::PrinterResolution might not be such a good idea, since it results in a 72dpi resolution when printing to a ps file. (Which I sometimes would like to do e.g., when printing a photo calendar with the calendar wizard KIPI plugin.)

From the Qt docs (QPrinter::PrinterMode):
"... ScreenResolution will produce a lower quality output than HighResolution and should only be used for drafts. ..."

An ideal solution might be to make the default for the QPrinter::PrinterMode m parameter of the KPrinter constructor a globally configurable option instead of hard-wiring it. Of course, this would require a modification of the KPrinter class, but it might be worth it, since all existing apps would benefit from it: People like Dave and me could use a default of QPrinter::HighResolution, while others satisfied with 72dpi or stuck with old hardware might be better off with the QPrinter::ScreenResolution setting for performance reasons.
Comment 19 lpetersen 2005-01-21 18:50:27 UTC
Just thought twice about that last suggestion of mine and realized that it's probably nonsense, since the default parameter value is substituted at compile time... Only way to enable existing apps (without modification) to print in higher resolution modes would be to reinterpret the QPrinter::ScreenResolution value to mean something user definable. Don't know if that would be a good idea, though.

So, I guess, it would be best to follow Dave's suggestion to add a check box to the print options of all apps which should produce high res output, like digikam, kooka, kuickshow, kview, ...

Thanks for your time!
Comment 20 Renchi Raju 2005-01-22 01:25:18 UTC
digiKam now prints at the printer resolution... always. If you want to print at some other resolution, just change the settings on the printer directly.
Comment 21 lpetersen 2005-01-24 09:15:37 UTC
Thanks a lot, this is good news! I can't wait to see it in action. :-)

I'm still not sure if this will allow printing to a ps file in a resolution higher than 72dpi, since the PS printer does not give me an option to set the printer resolution (unless I'm missing something?). However, printing to a physical printer in its native resolution(s) is fair enough, I guess. 

Once more, thank you for this great program!
Comment 22 apm13 2005-03-02 19:34:36 UTC
I think there's still a problem here.  If I try and print an image (say some scanned text) to the PS or PDF pseudo-printers I get really poor quality 72 dpi output, and there seems to be no way to change this (the 'Image Resolution', 'Downsampling', and 'Compression' settings in the driver settings seem to have no effect).  Must it be this way?  It would nice to be able to make a nice PDF out of a high resolution scan.
Comment 23 Xuân Baldauf 2005-06-12 22:23:56 UTC
This bug still applies to "kuickshow", "Gwenview" and "kipi print wizard" in their SuSE 9.2 versions (2004 October, package kdegraphics3-imaging-3.3.0-12). Is the bug fixed for these applications, too?