Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to the IPython.display.Image object #2053

Closed
fperez opened this issue Jun 30, 2012 · 0 comments · Fixed by #2231
Closed

Improvements to the IPython.display.Image object #2053

fperez opened this issue Jun 30, 2012 · 0 comments · Fixed by #2231
Milestone

Comments

@fperez
Copy link
Member

fperez commented Jun 30, 2012

It should:

  • be more friendly to the first argument being a local or remote path to any valid image format (right now it seems to work with png but not jpeg, on simple testing).
  • support width/height keywords and emit the corresponding html.
  • we should consider whether the return value should wrap the result in a jquery resizeable container, to match how the other image objects that are returned from plots behave.
@Carreau Carreau closed this as completed in 19feb23 Aug 2, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Improve Image format validation and add html width,height

This addresses the first two bullets of ipython#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()

Closes ipython#2053

Add `assert_is_none`, `assert_is_not_none` to `nose.tools`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants