22.03.2015 Views

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Color <strong>and</strong> its Use 12.3<br />

Colors in Images<br />

Color spaces may also be used separately with images if those images are bitmaps. A<br />

color model must be specified as a CosStructure when using<br />

dlpdfimagecreatefrombmp. The CosObj form of a color is obtained from the<br />

PDE form by the call PDEColorSpaceGetCosObj. Creating the PDE form is<br />

explained below.<br />

When images are created with any of the other dlpdfimagecreate-type calls, color<br />

spaces will be constructed as needed.<br />

Creating <strong>and</strong> Destroying Color Spaces<br />

For the basic colors, the color spaces used in your document will be in the form of a<br />

PDEColorSpace. This is not a document object, <strong>and</strong> therefore can be shared<br />

between documents. A COS form of that space will be created <strong>and</strong> inserted into each<br />

document where that color space is used. These color models can be created when the<br />

Adobe PDF Library is initialized, <strong>and</strong> should be destroyed before it is closed.<br />

CAUTION: If color models are not freed, a close error will result.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!