WilliamL wrote:Now that I have the window printed out I'm finding that the output, if in color, the grays are in rainbow colors and is unreadable, if I print out in grayscale the text is in waves of dark and light and just as unreadable.
If I try to print with the last code I posted looks good, probably it's a question of how good the printer driver is to map the color into greyscale.
WilliamL wrote:
@luis - could this be converted into a threshhold filter?
I read your pm, but this is not my code, original thread is this:
http://www.purebasic.fr/english/viewtop ... 12&t=38897
Certainly you can reduce the color of the original grabbed image to 8 or even 2 bits if you like, to compensate for a probably not exceptional printer driver.
If you reduce the color to only 2 bits (probably it's overkill) you would have to use some form of dithering too.
I would say if you reduce the image to greyscale and then print that, should be ok. I read you seem to have tried that, and the fact it's not working surprise me. But maybe again you relied on the printer driver to do that, so try to convert the image to greyscale before print it.
Code: Select all
Procedure.l GrayscaleImage(image_no.l, method.l = #GrayscaleImage_Weighted) ; < note the .l definitions?
Yes, I noted the .l definitions (so ... uh ?)
You can try with the code you just found, or try to look in the forum for greyscale conversion or something like that, or you can do it by yourself, simply reading the source pixel, adding the r g b components, dividing them by 3 and then storing the result in the same pixel. Refer to the code you posted for other "perceptual different" ways to do that.
Try that.