The pixel pattern can also be obtained as a pattern of bits packed into bytes (unsigned char) using the getBits() function.
Declaration
Int getBits(unsigned char * szOut, int isteer);
Where szOut is a pointer to an array of bytes that will receive the pixel map. The array pointed to by szOut must exist and be large enough to receive the pixel map.
Isteer – is an integer that determines whether the pixel patter is copied to the szOut buffer or the length of the pixel pattern is returned.
If isteer is 1 the a pixel pattern is not copied, but the length of the pattern in bits is returned by the call. If there is no current pattern (which is the case when an error has occurred) the function returns 0.
If isteer is 0 then the pixel pattern is copied to the buffer pointed to by szOut. The buffer must exist and be large enough to receive the complete string, otherwise a memory overwrite will occur. The function returns the length of a single line in the pattern – NOT the length of the whole pattern.
Note that the pixel pattern is only created when a successful call to barcode() has returned.