Results 1 to 5 of 5

Thread: Monochrome Bitmap

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2002
    Posts
    27

    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.

  2. #2
    Member FinnPanther's Avatar
    Join Date
    Jun 2001
    Location
    Finland
    Posts
    53
    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
    -Panther

    Panther's HQ

  3. #3
    Member FinnPanther's Avatar
    Join Date
    Jun 2001
    Location
    Finland
    Posts
    53
    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.
    -Panther

    Panther's HQ

  4. #4
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    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!

  5. #5
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    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
  •  



Click Here to Expand Forum to Full Width