An old C code for bi-level thresholding of an 8-bit BMP image in DOS : r/C_Programming
Why a bitmap (.bmp), not a.jpg? If you cannot save a.bmp, make it an uncompressed.tif. Compression (of this 8-bit 397,000 pixel image): none (397kb memory)medium. - ppt download