How do I create a DeviceN color space?

43 views
Skip to first unread message

Support

unread,
Feb 29, 2008, 8:25:22 PM2/29/08
to PDFTron PDFNet SDK
Q: A related question (to 'How can I can create ICC PDF color space')
is how do I support n-channels (when there's more than 4)?

----
A: To create a color space with more than 4 channels you could create
a DeviceN color space:

Obj devicen = pdfdoc.CreateIndirectArray();
devicen.PushBackName("DeviceN");

Obj names_arr = devicen.PushBackArray();
names_arr.PushBackName("Color1");
names_arr.PushBackName("Color2");
names_arr.PushBackName("Color3");
names_arr.PushBackName("Color4");
names_arr.PushBackName("Color5");
names_arr.PushBackName("Color6");

// Alternate color space
devicen.PushBackName("DeviceCMYK");

Obj tint_transfrom = pdfdoc.CreateIndirectDict();
... create the function object that
... transform colorants from DeviceN to CMYK
devicen.PushBack (tint_transfrom);

// Now use the color space...
// Create a high-level color space....
ColorSpace cs = new ColorSpace(devicen);
Reply all
Reply to author
Forward
0 new messages