Fixes for BMPReader/BMPWriter.