BackendLib

From Scantegrity Wiki

Revision as of 14:01, 15 October 2008 by 130.85.93.101 (talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Printing Module[edit]

Invisible Ink Symbol Generator Module[edit]

The Invisible Ink Symbol Generator (IISG) Module processes symbols and produces an image of the symbols with a background of reactive ink and a foreground (font color) or non-reactive (dummy) ink. The images produced by this module are embedded into ballot files that are printed on an invisible ink-capable printer. The generated images is straightforward, but the module has a number of extra functions to increase the security properties of the printed ink.

Error creating thumbnail: Unable to save thumbnail to destination
The reactive ink (yellow) and dummy ink (magenta) are base inks in the printer that are printed in contiguous blocks. When printed, the inks are indistinguishable from each other.

IISG provides the following functions:

  • Generate  — Generates an Invisible Ink Image using the specified size, font, and other formatting data.
  • GenBlocks  — Takes a generated image and creates contiguous blocks of a given size, with a given amount of horizontal and vertical white spaces on each block. See the diagram for an illustration. N.B. Should not be used with anti-aliased fonts.
  • Munge  — On a pixel by pixel basis, randomly add or subtract from the "brightness" of a given image.
  • BlockMunge  — On a block by block basis, randomly add or subtract from the "brightness" of a given image.
  • Mask  — On a pixel by pixel basis, apply a random amount of cyan.
  • BlockMask  — On a block by block basis, apply a random amount of cyan.
  • GetBMP  — Return a bitmap of the generated image.
Error creating thumbnail: Unable to save thumbnail to destination
Scantegrity II ballot and decoder pen.
Left: Unmarked optical scan bubble.
Right: Marked optical scan bubble revealing confirmation code "FY".

Any function above that relies on a random function is assumed to be taking as a parameter a pre-keyed cryptographically secure pseudo-random number generator. Also, white is considered a "null" color and any operations on it should return white.