FredrikNoren/ungit — pull request #254 by codingtwinky (2013-10-30 04:38:51+00:00)
Title: #60 Image diff in staging

![screen shot 2013-10-29 at 23 24 56](https://f.cloud.github.com/assets/5281068/1434476/6824ab86-411b-11e3-8f61-ecff3c0683db.png)

Ungit now displays images in staging. Issue https://github.com/FredrikNoren/ungit/issues/60

Tested with JPG, GIF, PNG and BMP.

---

* fixed removed image diff not appealing, see comment below.

* I have implemented test cases, but given how uneasy is to actually create an image file, I'm testing with a text file that is disguised as an image file. It works fine but it doesn't really test binary encoding, which is a critical part of image file api call. Let me know what is your thought on this.

* "Image jumping" is not fixed with this one, I might have to bounce some ideas with you but as a person who never actually learned CSS I can only think of having two images and alternate two images interchangeably upon load finish. Which seems clunky to me....