check if image is loaded first to avoid issues.
allow for initialising from an image