How to store a 1 or 8 bit DIB in a pdf as a thumbnail image

Hi James,

For 8 bit images you would pass 8 and for 1 bit 1

The main problem is that you are specifying ColorSpace::CreateDeviceRGB(). For 8 bit or 1 bit images you should pass ColorSpace::CreateDeviceGray() instead.

Finally, for 1 bpc images makes sure that all lines in image data are byte aligned.