Added changes to accept ImageFormat