handle negative height bitmaps and ensure that we read in bmp dimensions as signed ints