Changes image type to byte[]