Fixed an issue when trying to resize monochrome png images.