How to save bmp (black & white) image file?

Javier Jair Elizarraraz S

Member
Licensed User
How ?

Hello Erel, thank for take my question.

In library i can see the method for save bmp, but i dont know how save it only in black & white file (1 bit, not 24 bits).

---- Help in library (imageEdit) :-------------------
SaveImageBMP(Image, FileName): Saves the Image in BMP format to a file with filename Filename.
--------------------------------------------------------

Thanks a lot for any idea.
 

Javier Jair Elizarraraz S

Member
Licensed User
Note

I write a not right method (other library).

-----------------------------------------------------
In help library (imageEdit) say:
-----------------------------------------------------------
SaveImage(PathName As String, Channel As String, Format As String) :

The file formats are"J" for jpg : "B" for bmp : "G" for gif : "P" for png. Anything else is saved as jpg.

----------------------------------------------------------

Sorry.
 

agraham

Expert
Licensed User
Longtime User
The help actually says
So

Saveimage("c:\temp\test.bmp", "L", "B")

will save an image as a grayscale image but, as the help says, it is still a 24 bit RGB image in which each colour channel contains the luminance values for each pixel. The library does not provide any means saving an image with a different colour depth, like 256 grayscale or 256 colour palette, as the Compact Framework does not provide this functionality. Also note that devices earlier that WM5.0 can only save in bmp format.
 

Javier Jair Elizarraraz S

Member
Licensed User
I working with desktop now, but device is target too

Thanks Agraham

I want use webcam like a tool for specific OCR input, i found some morphologics routings that use b/w (1 bit) bmp file, i can move routines (vb) to basic4ppc and work all is same place, but i wish test all before of working with details.

May be i can call other tool (command format convert tool) using shell and take files names like parameters. I need found this auxiliary tool (program) to make the convertion (input; file image in 24 bit format , output; file in 1 bit format).

Sorry for my english, this is not my born language.

Regards.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…