Anyone know how I can output the image from a picturebox, to a .bmp file in monochrome format (1 bit).
This is something I am trying to do for a faxing program.
Printable View
Anyone know how I can output the image from a picturebox, to a .bmp file in monochrome format (1 bit).
This is something I am trying to do for a faxing program.
Damn I had the code in a game I'm working on (function that makes masks for bitmaps) but I replaced it with a better one...
I can write it again and post it here, shouldn't be a problem ;)
This. Can't. Be. True. Crap.
I wrote the function but for some unknown reason it didn't work as well as it was supposed to. Well, a little problem, can be fixed.
But, then the goddamn Visual Basic 6.0 went and crashed! Needless to say, I hadn't saved my work :(
So.... maybe later I'll post the code... or some other will. Right now I've things to do.
well first you should decide about how dark a pixel has to be to be black or white.
You could get all RGB components average them out and say that every numer above 128 is black and every number below white. Than you just replace them (use API or direct memory access, using the point method would slow down things really bad) than you can just use the savepicture method, I think that should work.
hm well I guess you would have to change the pixel format somewhere in the stdpicture properties, but I am not tataly sure if VB does even support writing monochrom bitmaps.
if not you should go to that handy page where they describe all the files (I know someone will give it to you around here) and put it out yourself, would be the more elegant way anyways :)