I'm trying to import an image and recognize by text in Python using below commands but it shows error.
My code:
from Tkinter import *
import pygame
import pyttsx3
pygame.init()
engine = pyttsx3.init()
root = Tk()
root.title('Application')
root.geometry('1352x652+100+100')
root.config(background='white')
str1 = StringVar()
str1.set('Application name')
frame1 = Frame(root,bg='white')
frame1.grid()
Disp = Canvas(frame1, width=160,height=120,bg='white')
Disp.grid(row=1,column=3)
img =PhotoImage(file='Icone.png')
image = Disp.create_image(85,62,image = img)
error stack trace:
img =PhotoImage(file='Icone.png')
Image.__init__(self, 'photo', name, cnf, master, **kw)
self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize data in image file "Icone.png"