start adding loading and saving image logic
(cherry picked from commit 94edffa8479af7225effc6a20c19f8198c22ce8f)