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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

12.6 <strong>DLI</strong> <strong>Implementation</strong> <strong>and</strong> <strong>Reference</strong> <strong>Guide</strong><br />

Values for Color Channels<br />

Concepts <strong>and</strong> Facilities: <strong>Guide</strong> to the DL Pager Composition System<br />

The values specified for the color channels vary from space to space, but the most<br />

common values range between zero <strong>and</strong> 1. Since these values are specified to the<br />

Adobe PDF Library as ASFixed values, this allows 16 bits of precision.<br />

Value Conversion <strong>and</strong> Inversion<br />

Your own system may specify color internally with a greater or lesser precision, or in<br />

inverted values. These must be converted to the Adobe PDF Library’s view of color to<br />

function correctly.<br />

Generally, you should first correct the precision, matching it to the Adobe PDF<br />

Library’s 16 bit precision, then correct the inversion (if there is one) by subtracting the<br />

number from an ASFixed one.<br />

When the precision difference is a matter of powers of two (as it often is), precision is<br />

corrected by shifting the value to match the Adobe PDF Library’s ASFixed format;<br />

e.g. if you are carrying color as a value of 0-255, shifting left 8 bits will correct<br />

precision.<br />

When the color specification is not in binary, e.g. zero to 100 or zero to 1000, try<br />

converting via floating point numbers. You may also create a subroutine to convert<br />

color values in precision <strong>and</strong> direction from the source system to the Adobe PDF<br />

Library’s system.

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

Saved successfully!

Ooh no, something went wrong!