public virtual System.Drawing.Image CreateDrawingImage(System.Drawing.Color foreground, System.Drawing.Color background) {
PaintCode();
int h = (int)yHeight;
int stride = (bitColumns + 7) / 8;
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(bitColumns, codeRows * h);
int y = 0;
for (int k = 0; k < codeRows; ++k) {
for (int hh = 0; hh < h; ++hh) {
int p = k * stride;
for (int j = 0; j < bitColumns; ++j) {
int b = outBits[p + (j / 8)] & 0xff;
b <<= j % 8;
bmp.SetPixel(j, y, (b & 0x80) == 0 ? background : foreground);
}
++y;
}
}
return bmp;
}