Python Forum
PIL Image im.show() no show!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PIL Image im.show() no show!
#2
There is nothing wrong with code,but when try to load image from temp location it fail.
Try to do all in interactive shell or all as code .py,now it look like you run to first line outside of shell.
Quick test both work.
(sc_env) tom@tom-VirtualBox:~/sc_env$ python
Python 3.10.2 (main, Jan 31 2022, 15:25:53) [GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import Image, ImageOps
>>> 
>>> image = '/home/tom/sc_env/images_icons_linux-bsd.gif'
>>> im = Image.open(image)
>>> im
<PIL.GifImagePlugin.GifImageFile image mode=P size=32x32 at 0x7F3FE666D630>
>>> im.show()
As code.
# im_test.py
from PIL import Image, ImageOps

image = '/home/tom/sc_env/images_icons_linux-bsd.gif'
im = Image.open(image)
im.show()
Output:
(sc_env) tom@tom-VirtualBox:~/sc_env$ python im_test.py (sc_env) tom@tom-VirtualBox:~/sc_env$ # show the image
Reply


Messages In This Thread
PIL Image im.show() no show! - by Pedroski55 - Feb-06-2022, 11:32 AM
RE: PIL Image im.show() no show! - by snippsat - Feb-06-2022, 01:09 PM
RE: PIL Image im.show() no show! - by Pedroski55 - Feb-06-2022, 07:52 PM
RE: PIL Image im.show() no show! - by Pedroski55 - Feb-06-2022, 09:21 PM
RE: PIL Image im.show() no show! - by Pedroski55 - Feb-07-2022, 08:28 AM
RE: PIL Image im.show() no show! - by snippsat - Feb-07-2022, 11:42 AM
RE: PIL Image im.show() no show! - by Pedroski55 - Feb-08-2022, 06:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  encode/decode to show correct country letters in a CTk combobox janeik 2 819 Sep-02-2023, 09:46 AM
Last Post: janeik
  PDF properties doesn't show created or modified date Pedroski55 4 1,212 Jun-19-2023, 08:09 AM
Last Post: Pedroski55
  Multiple.ui windows showing at the same time when I only want to show at a time eyavuz21 4 1,128 Dec-20-2022, 05:14 AM
Last Post: deanhystad
  How to get cell(x,y).value = "\'=name(p)" to show correctly ?? ozlevia 9 3,763 Oct-31-2022, 06:47 PM
Last Post: deanhystad
  Why doesn't it show me anything in print? Melcu54 2 972 Oct-01-2022, 12:07 AM
Last Post: snippsat
  PIL Image im.show() no show! Pedroski55 2 1,041 Sep-12-2022, 10:19 PM
Last Post: Pedroski55
Question Trouble installing modules/libraries and getting Notepad++ to show cyrillic letters Dragiev 6 2,366 Jul-24-2022, 12:55 PM
Last Post: Dragiev
  python basemap, cant show the right coordinates dbsr 0 1,016 Jun-08-2022, 01:55 PM
Last Post: dbsr
  Make console show after script was built with Pyinstaller --NOCONSOLE? H84Gabor 0 1,268 May-05-2022, 12:32 PM
Last Post: H84Gabor
  I cannot install this library. Can someone show me how? Led_Zeppelin 8 6,140 Mar-12-2021, 05:17 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020