Mainly bugfixes for format issue (load/save bmp/pnm)

- these problems were not seen when doing grayscale only!
- hopefully, this time i got everything right!
- note: only 24-bit color format is currently supported!