Reset the IODevice when loading an image