Board index » delphi » Printing a color image to a laser printer

Printing a color image to a laser printer

How do I print a color image in grayscale to a laser printer?

--
Doug Reece

 

Re:Printing a color image to a laser printer


Quote
"Doug Reece" <dre...@rtechnics.com> wrote in message

news:3B3A7849.20ABE383@rtechnics.com...

Quote
> How do I print a color image in grayscale to a laser printer?

Usually you can just use StretchDIBits and print the color image on a laser
printer:
http://homepages.borland.com/efg2lab/Library/Delphi/Printing/Default....
ntBitmap

If StretchDIBits fails, use Joe Hecht's TExcellentImagePrinter
http://www.code4sale.com/joehecht/prndib.htm

If you would like to control the conversion of RGB to grayscale, try the
"Gray Scale" info/links on this page:
http://homepages.borland.com/efg2lab/Graphics/Colors

--
efg -- Earl F. Glynn, Overland Park, KS  USA
efg's Computer Lab Mirror:  http://homepages.borland.com/efg2lab

Re:Printing a color image to a laser printer


I have tried both StretchDIBits and TExcellentImagePrinter.  Neither work as I
would hope.  The image gets printed in a blochy monochrome look, no dithering or
halftoning.  My source image is a 32-bit bottom-up DIB.  However, if I copy and
paste the image into Paint and print it there, it prints as I would expect.

(BTW, the first link in your response appears to be broken).

Quote
"Earl F. Glynn" wrote:
> "Doug Reece" <dre...@rtechnics.com> wrote in message
> news:3B3A7849.20ABE383@rtechnics.com...
> > How do I print a color image in grayscale to a laser printer?

> Usually you can just use StretchDIBits and print the color image on a laser
> printer:
> http://homepages.borland.com/efg2lab/Library/Delphi/Printing/Default....
> ntBitmap

> If StretchDIBits fails, use Joe Hecht's TExcellentImagePrinter
> http://www.code4sale.com/joehecht/prndib.htm

> If you would like to control the conversion of RGB to grayscale, try the
> "Gray Scale" info/links on this page:
> http://homepages.borland.com/efg2lab/Graphics/Colors

> --
> efg -- Earl F. Glynn, Overland Park, KS  USA
> efg's Computer Lab Mirror:  http://homepages.borland.com/efg2lab

--
Doug Reece
R-Technics

Re:Printing a color image to a laser printer


Quote
"Doug Reece" <dre...@rtechnics.com> wrote in message

news:3B3B4D3A.4A8E6F7D@rtechnics.com...
Quote
> I have tried both StretchDIBits and TExcellentImagePrinter.  Neither work
as I
> would hope.  The image gets printed in a blochy monochrome look, no
dithering or
> halftoning.  My source image is a 32-bit bottom-up DIB.  However, if I
copy and
> paste the image into Paint and print it there, it prints as I would

expect.

Perhaps you've already tried this:

Many printers have a variety of settings and the wrong settings can cause
what you're describing.  For example, a "real world" image printed in
"coarse" dithering on an HP LaserJet will look awful.

I've never bothered trying to get these settings right from program
control, especially since they vary by printer.

Quote
> (BTW, the first link in your response appears to be broken).
> > Usually you can just use StretchDIBits and print the color image on a
laser
> > printer:

http://homepages.borland.com/efg2lab/Library/Delphi/Printing/Default....

Quote
> > ntBitmap

Thanks for this info.

Sorry, I recently moved my site to a Unix server and all the "Default.htm"
files
were changed to "index.html".
http://homepages.borland.com/efg2lab/Library/Delphi/Printing/index.ht...
tBitmap

--
efg -- Earl F. Glynn, Overland Park, KS  USA
efg's Computer Lab Mirror:  http://homepages.borland.com/efg2lab

Re:Printing a color image to a laser printer


Some printers do not do well with 32 bit DIB's.  Have you tried converting to 24 bit?

John Williams

Quote
Doug Reece wrote:
> I have tried both StretchDIBits and TExcellentImagePrinter.  Neither work as I
> would hope.  The image gets printed in a blochy monochrome look, no dithering or
> halftoning.  My source image is a 32-bit bottom-up DIB.  However, if I copy and
> paste the image into Paint and print it there, it prints as I would expect.

Re:Printing a color image to a laser printer


I just tried what you suggested and it does work on the printer I am using.  Thank you.

Quote
John Williams wrote:
> Some printers do not do well with 32 bit DIB's.  Have you tried converting to 24 bit?

> John Williams

> Doug Reece wrote:

> > I have tried both StretchDIBits and TExcellentImagePrinter.  Neither work as I
> > would hope.  The image gets printed in a blochy monochrome look, no dithering or
> > halftoning.  My source image is a 32-bit bottom-up DIB.  However, if I copy and
> > paste the image into Paint and print it there, it prints as I would expect.

--
Doug Reece
R-Technics

Re:Printing a color image to a laser printer


Quote
> How do I print a color image in grayscale to a laser printer?

I recommend grayscaling the image yourself, then using our
TExcellentImagePrinter product to print it. Even if you grayscale
yourself, you need good printing code that will do its best to
keep the image rendering as consistant as possible across printers.

Take a look at TExcellentImagePrinter at:
http://www.code4sale.com/joehecht

If you need further assistance, please email me :)

Joe
--
John Kaster is cycling to cure cancer! Lets help him out! http://homepages.borland.com/jkaster/tnt/
Jimmy Page is having a charity artwork sale: Action For Brazil's Children Trust: http://www.abctrust.org.uk/
Whole Lotta Love computing to cure cancer! http://www.wholelottalove.org/

Other Threads