Changed the semantics of constructors
Added methods to differentiate jpg and bmp data