Moved from file to buffer for image processing