Board index » delphi » Fast printing bitmap images.

Fast printing bitmap images.

I print bitmap images using StretchDIBits function and
it goes VERY SLOW (something like 20-30 seconds for
printing ONE stretched image and few text lines). I found
out that the call to stretchDIBits takes most of the printing time.
I tried to set the priority class of the current process to
REALTIME_PRIORITY_CLASS
and it didn't make any difference. If anyone knows how to improve this poor
performace, please reply (I'm close to tears...)
Thanks, Gidi.
 

Re:Fast printing bitmap images.


Gidi -

 > I print bitmap images using StretchDIBits function and
 > it goes VERY SLOW (something like 20-30 seconds for
 > printing ONE stretched image and few text lines). I found
 > out that the call to stretchDIBits takes most of the printing time.

Are we talking about the time spent in the call to StretchDIBits (CPU
time), or the time to transfer the file to the printer (printing
time)?

StretchDIBits can be slow, depending on the source bitmap and the
destination. It may require a lot of disk I/O, particularly for a high
resolution printer.

Unfortunately there's very little you can do about it. All of the time
is being spent in the MS Windows code. Of course, having a reasonably
optimized disk, and minimizing the size of the bitmaps will help a
lot.

Good luck.

Kurt

Other Threads