I don't see any white in the second picture.
Type: Posts; User: Norm
I don't see any white in the second picture.
There is s contradiction here. B/W vs gray.
Sorry, i have not ideas about the algorithms you mention.
If you only want black and white then you need to write either 0, 0, 0 or FF FF FF for the three bytes.
Are you looking for an algorithm for converting pixels to either black or white?
Read a pixel and change its color to either 0x000000 or 0xFFFFFF