Ask Your Question
0

PIL image display in JupyterLab

asked 2024-07-31 16:33:58 +0200

mn124700 gravatar image

updated 2024-07-31 16:34:44 +0200

How do I get PIL images to display in SageMath on JupyterLab 4.2.4? I tried this...

from IPython.display import display
from PIL import Image
img1 = toimage(data)         # PIL image
display(img1)

All I get for the output is...

PIL.Image.Image image mode=RGB size=720x360 at 0x184D1AE10

Any advice? Thanks. Eric

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2024-07-31 17:04:03 +0200

mn124700 gravatar image

Okay, I figured it out. Posting here for the benefit of others.

I had to turn off latex printing...

%display plain

Then it worked fine.

edit flag offensive delete link more

Comments

Posting here for the benefit of others.

Thank you ! This forum seems to be a non-negligible source of information to Sage users.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2024-07-31 21:59:52 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-07-31 16:33:58 +0200

Seen: 150 times

Last updated: Jul 31