I converted the bitmap to a monochrome one and then used the pixel brightness to generate a rectangle for each pixel, hope this helps.