Reading an image program, Basic structure