Image serialization, maybe?

Hoping that you guys can take a look at this and see what I'm missing, if anything. Stephen and I talked about this yesterday, and I implemented his suggestions. Not sure how to test if it works, if it does anything, or what the expected result might even be. Stephen, can you take a look at this? Feel free to change anything, I'm not particularly attached to this code. Godspeed friends.