ipython/ipython — pull request #2178 by jerryatmda (2012-07-20 21:48:49+00:00)
Title: issue2053: improve Image format validation and add html width,height

This addresses the first two bullets of #2053
Validates first argument to constrain format to png, jpeg,
Lets user specify width, height, or both and emits appropriate html

I introduced a couple of class constants to minimize the number of times I saw 'jpeg' and 'png'
and document the _ACCEPTABLE_FORMATS.

I added one real jpeg image to the test directory and one zero-length gif file to survive the file not found
error in super()

Thanks, Min, for the coaching, I hope it looks adequate.

Closes #2053