|
-
Feb 6th, 2002, 06:47 AM
#1
Thread Starter
Junior Member
Monochrome Bitmap
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.
-
Feb 6th, 2002, 01:02 PM
#2
Member
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
-
Feb 6th, 2002, 01:47 PM
#3
Member
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.
-
Feb 6th, 2002, 01:52 PM
#4
Frenzied Member
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.
Sanity is a full time job
Puh das war harter Stoff!
-
Feb 6th, 2002, 01:55 PM
#5
Frenzied Member
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
Sanity is a full time job
Puh das war harter Stoff!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|