saved the imageData before the window is resized