0
Python code to add set of images and display images randomly using after function
9 Answers
0
Very little info
0
No...I know how to display image.....the question is to add set of images and display each image at a particular time interval by setting timer using after() function
0
being pratik I think I answered. You gave us very little info, what framework are you using to manipulate images ? What GUI are you using ? How are the pictures stored ? Come on, how do you expect us to answer.
0
I am working with Pillow and Tkinter module
0
Can you share your code here ?
0
being pratik if you managed to make a working app with tkinter and PIL, then you have done the hard part. All you need to do is add the random function, that will randomly choose images from the set. For the interval, use the time module.
0
Sorry....I am unable to code this question...I do not know how to add timer in image
0
being pratik you don't add the time in the image. Create a new function in tkinter, for example:
def random_pic():
pic = random.choices(list_of_pictures)
And then set an interval to repeat this function over and over again.
0
import sleep, then sleep(time in secends) and that will pause the code where it is and start back after the time set has finished