Added unit tests. Added method to generate and get the base 64 encoded data ready for an HTML img tag.