optimize image data access