I am having some troubles while trying to insert images in a pdf while changing its colorspace. Right now I have a png monochrome image (8 bits, 1 bit depth) where the 1 is black and the 0 is transparent (something like a mask). I want to insert this image into a pdf file and change the colorspace to separation, because it needs to be printed using a spot color. Is there some way to do that?
Currently I tried this:
<</Type /XObject
/Subtype /Image
/Width 800
/Height 600
/ColorSpace <</CS0 6 0 R>>
/BitsPerComponent 1
/Filter /FlateDecode
/DecodeParms <</Predictor 15 /Colors 1 /BitsPerComponent 1 /Columns 800>>
Being this the separation colorspace:
6 0 obj
[/Separation /White 10 0 R
<<
/FunctionType 2
/N 1
/Range [0 1 0 1 0 1 0 1]
/C1 [1 0 0 0]
/Domain [0 1]
/C0 [0 0 0 0]
I also tried adding the colorspace definition inlined, but did not work.