Image extraction: handle ICCBased color space, handle 1-bit P4 bitmap

Previously ICCBased color spaces would result in an unknown colorspace.
Now it'll look for the Alternate on the ICCBased color space.

Previously a P4 bitmap (1-bit per pixel) would result in an invalid
buffer size warning, but now it'll extract the image correctly.