romannurik/muzei — pull request #102 by ianhanniballake (2014-11-28 04:22:12+00:00)
Title: Handle Invalid Images without crashing

Previously, Muzei assumed that if a file specified by an art source was downloaded that it was a valid image, leading to crashes when loading the BitmapRegionLoader on an invalid file. This fix attempts to open the image immediately after writing it to ensure that the image is valid and able to be parsed by Muzei. By doing this at the ArtworkCache level, we can properly mark the error state and show grumpy mcpuzzles for invalid images.