Skip to content

Image[] (again) - #482

Merged
sn6uv merged 47 commits into
masterfrom
unknown repository
Aug 23, 2016
Merged

Image[] (again)#482
sn6uv merged 47 commits into
masterfrom
unknown repository

Conversation

@ghost

Copy link
Copy Markdown

This is a rebase of #378 to the Mathics branch.

It works perfectly in the classic Mathics web interface.

Combined with #480 and a small change, this will also work in Jupyter kernels.

@sn6uv

Copy link
Copy Markdown
Member

I've closed #378 in favour of this one.

@sn6uvsn6uv added this to the 1.0 milestone Aug 16, 2016
@ghost

Copy link
Copy Markdown
Author

in its current form, this now depends on #480

contents = stream.read()
stream.close()
with warnings.catch_warnings():
warnings.simplefilter("ignore")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What warnings are we ignoring here? Are they important?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. During the conversion of floating point to byte components (which are necessary for the png encoding), PIL outputs a warning that precision might be lost. Since this code only handles the display for the frontend, it doesn't matter.

@sn6uv
sn6uv merged commit 86694ff into mathics:masterAug 23, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@sn6uv@l1ebl@lieblb