Like Ra's Naughty Forum
Software - Random Slideshow - Printable Version

+- Like Ra's Naughty Forum (https://www.likera.com/forum/mybb)
+-- Forum: Technical section (https://www.likera.com/forum/mybb/Forum-Technical-section)
+--- Forum: Various technical topics (https://www.likera.com/forum/mybb/Forum-Various-technical-topics)
+--- Thread: Software - Random Slideshow (/Thread-Software-Random-Slideshow)

Pages: 1 2


Software - Random Slideshow - gryxo - 18 Oct 2018

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


RE: Software - Random Slideshow - Like Ra - 18 Oct 2018

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?


RE: Software - Random Slideshow - Like Ra - 18 Oct 2018

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....


RE: Software - Random Slideshow - Like Ra - 18 Oct 2018

Switched to another directory with pics and it works now!

Can be used for subliminals as well 😉


RE: Software - Random Slideshow - gryxo - 18 Oct 2018

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 !


RE: Software - Random Slideshow - gryxo - 18 Oct 2018

(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 !


RE: Software - Random Slideshow - Like Ra - 18 Oct 2018

(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 😉


RE: Software - Random Slideshow - Like Ra - 19 Oct 2018

Similar idea, but web-based: https://gooninator2.neocities.org/?sources=&timingFunction=fixed05


RE: Software - Random Slideshow - Like Ra - 19 Oct 2018

Correct links:

https://gooninator.neocities.org <- version 1
https://gooninator2.neocities.org <- version 2


RE: Software - Random Slideshow - gryxo - 22 Oct 2018

(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....