The bitmap specification mentions that bitmaps can be stored from top to bottom instead of the usual bottom to top if the image height is negnative.
We should add a reftest for each bit per pixel value to test negative heights.
Created attachment 553983 [details] [diff] [review]
Patch for more reftests with negative heights which means top to bottom
Everything passes with the refactored code by the way.
Pushed to mozilla-inbound: