![]() This method is used to create an image with a name.Ī transparent image can be displayed using this method. The corresponding PIL module is present in PyPi which can be installed using the pip package manager.For the PhotoImage class, image.open(file to be opened) method to work, Python Imaging Library, or PIL must be installed which allows loading of images.The image.open(file to be opened) method is used to open the file which searches for the specified file in the program directory.The format of these images can be of various types including png, jpeg, gif, tif, ppm, bmp, etc.A class in Tkinter called PhotoImage class is used to display grayscale images or real color images in Tkinter.Where path_of_the_image is the path where the image to be displayed is present. ImageTk.PhotoImage(Image.open(path_of_the_image)) Web development, programming languages, Software testing & others Start Your Free Software Development Course ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |