Some "built-in" tumblr site are dead, and are not consistent with their assigned type, but the concept is interesting, and very close to what you're working on.
And I would suggest to save the script, just in case.
Yes, I think it could be a simple backup plan 😉
I really like the web based application, but I don't know anything about web development and I've got no time to learn. Maybe later 😉
(18 Oct 2018, 21:52 )gryxo Wrote: [ -> ]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
The syntax of Python must have changed. To include certain special characters in a string, you need a two-key combo beginning with a backslash. To get an actual backslash in a string, you need to use a double backslash. Hence, the \ characters in the path string should be replaced with \\ in modern Python.
Also, you can resize the images so that they are as large as possible that fits into the display window while maintaining the same aspect ratio. This is most useful when you have pictures that are larger than your screen size. Blowing up small pictures will make the picture appear less sharp. You can do this by adding a few lines to your code.
add "import ctypes" to the other import lines.
add the following two lines somewhere near the top after the imports.
user32 = ctypes.windll.user32
W, H = user32.getSystemMetrics(0), user32.getSystemMetrics(1)
Now add the following line to just before the line "photo = ImageTk.PhotoImage(image)"
image.thumbnail( (W,H), Image.ANTIALIAS )
That's it!