Fix case in PixelMap where input array length doesn't match width*height