Updated to pass ImageResult class