Python Forum

Full Version: Open Pictures with Python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello guys
with my workmate we have to make a programm.
I'll explain you it quickly.
So we would like to make a kind of narrative story in which the user have to choose if an event will happend or not (for example if the WW2 will happend or not and it will change the actual society)
We already did the different Timelines that we saved as JPEG, but we have no idea of how we could open the picture with python, maybe we need to use a tier app ? can you enlighten us ?
There are many solutions to open images with python. You can use GUI toolkits such as tkinter, wxpython, PyQt5, pygame etc. You can also use python bindings to the imagemagick library, such as the wand module
>>> from wand.image import Image                                                            
>>> from wand.display import display                                                        
>>> with Image(filename='/home/me/foo.jpg') as image:
...     display(image)
...
>>>