Bug 124357

Summary: Output resolution of print wizard is very low
Product: [Applications] digikam Reporter: Dik Takken <kde>
Component: Plugin-Generic-PrintCreatorAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: david, imaging-bugs-null, vidalgm, wg
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 0.9.0
Sentry Crash Report:

Description Dik Takken 2006-03-27 14:02:42 UTC
Version:           0.1.0-rc1 (using KDE KDE 3.5.1)
Installed from:    Gentoo Packages
OS:                Linux

I would like to report a problem that looks similar to the low-resolution printing problems reported before. If my understanding of the existing reports is correct, these problems have been solved some time ago. Now using Kipi plugins version 0.1.0_rc1 I see a similar problem. It looks like my problem has a difference cause though, because the wizard seems to be responsible for the downscaling, not the print system (see description below). If it turns out to be the same problem after all, one of the existing bugreports can be re-opened.

Description of the problem:

It looks like the print wizard uses a very low image resolution internally. When you use the 'small thumbnails' template and advance to the cropping settings, you can clearly see that each thumbnail has a resolution of only about 100x150 pixels. As the pixels are really big on the screen, it looks like the photos are being downscaled by the printing wizard itself.

When you actually print the thumbnail sheet, you get a printout with the same low resolution. You can clearly see that each thumbnail on the paper has the same estimated 100x150 pixel resolution as the print wizard shows in the cropping step. When you create a printing preview or save to Postscript you can also see the low resolution.

When using a printing template with a larger photo size (like four photos on one sheet ) the resolution is also very low.
Comment 1 Angelo Naselli 2006-04-15 18:59:04 UTC
It seems ok here at least if i export to pdf. ps is a bit slow to see, at 100% in kghostview, but i don't see a bad thumbnails. Increasing the zoom into pdf doesn't
seem to lose resolution.
Comment 2 Angelo Naselli 2006-04-15 19:02:34 UTC
*** Bug 101495 has been marked as a duplicate of this bug. ***
Comment 3 Dik Takken 2006-05-02 21:40:37 UTC
Ok, I tested the print wizard on both KDE 3.4 and KDE 3.5. On KDE 3.5, the output looks perfect, rendering a print preview takes a long time. On KDE 3.4, the output resolution is very low, rendering a print preview is quite fast. So, the KDE version of this bugreport is incorrect.

There must be some sort of change in the KDE printing system between KDE 3.4 and KDE 3.5 which fixes the resolution problem.

Comment 4 Matthias Wieser 2006-05-09 23:47:10 UTC
I have seen this bug on kde 3.5., too. (Suse 9.3 + supplementary kde 3.5.2)
Resolution is roughly 1mm!

On the other hand the same kipi-plugins version (1.0-RC1) on my own suse 10 box (kde 3.5.2) produces sharp outputs. On the other hand, under suse 10 the resolution probably is way too high: a simple 9cm*13cm printout results in a ~52MByte print-file. With this size, ghostscript (or cups) needs extremely much time until the printing starts. A resonable size of the print file qould be 4.7MByte, not 52 MByte! (3" * 30ppi * 3.5"*300ppi * 3 colors = 4.7MByte)

Some time ago I was affected by the old "lowresolution printing" bug, now I'm affected by this "sometimes print with extremely low resolution, sometimes print with extremely high resolution" bug. Is there really no modern kde-program which can print images?

I don't know what the print wizard does, but should'nt it just do
1. crop (should be optional!!)
2. bicubic scale to minimum(printer resolution, 400ppi)
3. unsharp mask
4. layout
5. convert to PS
6. send to KDE print framework
Comment 5 Dik Takken 2006-05-10 10:56:41 UTC
Allright, so it does not depend on the KDE version... The QT version on both my KDE machines is identical, so QT isn't part of the problem either.. 

On my KDE 3.5.2 box, rendering a print preview takes about 15 minutes, and it looks really good. On the KDE 3.4.3 box, rendering the preview takes just a few seconds with printed pixel sizes of about 1 millimeter indeed.

Apart from the different KDE versions, the only relevant difference between both machines is the printer driver. The KDE 3.5 machine has an old HP Deskjet printer and uses a Foomatic driver, while the KDE 3.4 box has a brand new Epson Stylus inkjet printer and uses a Gimp-Print driver. 

Is it technically possible that the resolution of the generated postscript depends on the type of printer driver, or even printer driver settings? How is the output resolution of the printwizard plugin determined?

Comment 6 Ruth Alkema 2006-07-27 17:53:11 UTC
I have the same problem.  Both from gwenview and digikam.  If I choose to output to gimp, and print from gimp, then it's okay, but if I print directly I get a very poor resolution. Not really 1mm as Dik Takken experienced, but more something like half a millimeter.
Comment 7 Dave 2006-08-07 05:51:15 UTC
I notice something similar that might be related.  The following details could help in reproducing and fixing this bug:

If I choose paper size "Letter" with "Open image using Gimp" then select photo size "thumbnails" I get a somewhat low quality, but workable 100dpi resolution image (850x1100 pixels).

If I choose any other paper size, the entire final image is scaled down to 1 dot per mm.  Thus, A4 renders an image for the entire page of just 210x297 pixels and selecting 15cmx10cm paper renders the entire page as an image of 102x153 pixels.

Printing other image sizes (not thumbnails) on all paper sizes seems to work fine - all open as high-res images in the Gimp.
Comment 8 Dik Takken 2006-12-09 17:05:20 UTC
On my Gentoo KDE-3.5.5 setup (DigiKam 0.9.0-rc2, kipi 0.1.0-rc1), the output quality of the print preview is reasonable, no matter what paper size I choose.

But whenever I print to a PDF/Postscript file, the output quality is really, really bad.

See Bug 138585 for details, the same thing happens for both the calendar and the print wizard plugins.
Comment 9 Angelo Naselli 2007-08-26 23:55:53 UTC
*** Bug 126863 has been marked as a duplicate of this bug. ***
Comment 10 David Anderson 2007-08-28 11:06:24 UTC
Copying text from bug report of closed duplicate 12683:

"I am using the print wizard to try to export to file with thumbnails (20 images on a sheet) on an A4 page. 
 
 The image that results is 210x297 pixels. The resulting image is hence very small. (It's the same whether I export to file or export to GIMP). 
 
 An A4 page is 210x297 millimetres. I therefore guess that there is a bug which is taking the page size in millimetres and failing to scale it up by a number of DPI."
Comment 11 Angelo Naselli 2009-02-25 22:44:11 UTC
is this still valid in kde4 and kipi-plugins 0.2.0 rc2?
Comment 12 Angelo Naselli 2009-11-15 17:12:38 UTC
Now templates are editable...
as when it was hardcoded thumbnails are designed for 100dpi, I don't know if that
was the problem, but you can now change your templates by following instructions into TEMPLATE_HOWTO file.
Definitions are:
<template name="Thumbnails_5x4" dpi="100" autorotate="false">
   <photogrid pageWidth="0" pageHeight="0" rows="5" columns="4" />
</template>

<template name="Thumbnails_6x5" dpi="100" autorotate="false">
   <photogrid pageWidth="0" pageHeight="0" rows="6" columns="5" />
</template>
You can now design your onw thumbnails or changing the above ones.
I'm closing this bug please add new comments or re-open it if the problem persists.
Comment 13 Angelo Naselli 2009-11-15 17:39:55 UTC
*** Bug 195960 has been marked as a duplicate of this bug. ***
Comment 14 Matthias Wieser 2012-09-09 19:46:26 UTC
Thanks for all the good work!