Reduce memory consumption of simple black and white images.