posted 10 years ago
I have the following program; it is meant to read a JPG file, create a buffered image of that file, compare each pixel to a cutoff value, and write either a black or white pixel in its place depending on whether it is above or below the cutoff.
It mostly works, except that the pixels it ends up writing appear to be either red or grey.
Clearly there's something about the pixel format I don't understand here. I'd appreciate it if someone could help me figure out what it is.
I am on a Windows system, using msPaint and Windows Picture and Fax Viewer to edit and look at the completed JPGs. I don't *think* those are affecting what I see, but then I don't understand what is happening, either.