better dimension handling in 2bpp->png