Defining image data functions