def is_valid_image(self, raw_data):
try:<EOL><INDENT>Image(blob=raw_data)<EOL>return True<EOL><DEDENT>except (exceptions.CorruptImageError, exceptions.MissingDelegateError):<EOL><INDENT>return False<EOL><DEDENT>
Wand library makes sure when opening any image that is fine, when
the image is corrupted raises an exception.