Revised to use ImageFrame instead of TIFFFrame