On our printing problems with the gnome build.


Subject: On our printing problems with the gnome build.
From: Martin Sevior (msevior@mccubbin.ph.unimelb.edu.au)
Date: Sun Jul 15 2001 - 09:08:11 CDT


Hi Dom,
        Regarding our failure to print Large Images in the gnome build:

This caused by our use of direct gdk-pixbuf scaling. Say I have a moderate
sized image, say 500 x 200 pixels. That fits nicely into an on screen
document at a resolution of 100 pixels per inch.

The total amount of memory of that pixbuf is 500 x 200 = 100,000 bytes. No
big deal.

Now however we go to print that image. Our resolution at printing is 7200
pixels per inch, a factor of 72 times higher. The image covers effectively
the same amount of paper as the screen but now the image is stretched over
area or dimensions 72 times large in X and y. So our memory usage is:

500 * 72 x 200 * 72 = 518 Megabytes !!

This is the amount of memory we're asking gdk-pixbuf to allocate by our
using gdk-pixbuf-scale-simple(..) to scale our in memory images to printer
resolutions. This is why we can print small images but anything larger we
choke badly on.

Now clearly there is no more information in the scaled up image for
printing than there is in the on-screen image. I'm trying to find an easy
way round this problem. Unfortunately the code appers to make no
distinction between useful scalings at low resolution (like zooming) and
the massive scaling of printing.

Maybe some judicous useage of query_properties will help. I'll
investigate.

Cheers

Martin



This archive was generated by hypermail 2b25 : Sun Jul 15 2001 - 09:08:16 CDT