Hi,
While procrastinating on my random video player, I made a random slideshow player.
This dirty script run on Python 3.
You just need to change the path to your picture folder. The script will scan it and then display the pictures on a window.
Here it is :
https://pastebin.com/5847He0C
Feel free to use, share and modify it 😉
Hope that someone find it useful.
Greetings,
gryxo
Need to check what tkinter and PIL do.
Quick question: does Image.open add the path only or the whole binary?
Edit: how do you install tkinter?
OK, for Linux
o- Tkinter
o- Python v2 and not v3
o- pip install Pillow (PIL is for Windows only)
o- the folder must end up with /
And it still does not like some pictures:
File "slideshow-01.py", line 28, in <module>
photo = ImageTk.PhotoImage(image)
. . .
IOError: image file is truncated (1 bytes not processed)
mmmm....
Switched to another directory with pics and it works now!
Can be used for subliminals as well 😉
Tkinter is the basic GUI for Python. It sometimes comes in the basic package with Python.
PIL is used to work with images.
Sadly, Image.open is loading the whole picture in Ram, not only the path. But It's the only way I found to make it work (I'm a noob, there must be a better way to do it...).
Sorry about linux, I only used Windows to debug it 😟
I'm sure it works on JPG and PNG. And normally it would not crash when a bad picture is opened.... It need some tweaking, but it is a little bit out of my scope....
If someone can improve it, it would be awesome !
(18 Oct 2018, 22:34 )Like Ra Wrote: [ -> ]Switched to another directory with pics and it works now!
Can be used for subliminals as well 😉
Cool ! The video part is still in the pipe, coming soon !
(18 Oct 2018, 22:39 )gryxo Wrote: [ -> ]Image.open is loading the whole picture in Ram
What allows the program to show them much faster, what can be used as a foundation for subliminals 😉
(18 Oct 2018, 23:48 )Like Ra Wrote: [ -> ] (18 Oct 2018, 22:39 )gryxo Wrote: [ -> ]Image.open is loading the whole picture in Ram
What allows the program to show them much faster, what can be used as a foundation for subliminals 😉
Exactly !
Wow ! This site is so great ! Didn't know about it....