Added ability to load mage where image is just byte array