Moved image post-processing to separate file.