I am programming a new python file which i need to convert it to .exe , it contains many images which i use PIL to open and resize them, then i add them to different labels , the directory is "F://image.png" , So after i convert it if another pc not containing the drive (F) and also not containing all images on it , exe will not run .. is there any solution to add them to the -.py- file to solve this . i can change the directory to C: but I think it is not a good solution, as i have to copy all the images to a folder after i convert -py- file.
resized_on=on.resize((60 , 30) , Image.ANTIALIAS)
on_new=ImageTk.PhotoImage(resized_on)
off = Image.open("F://off.png")
resized_off=off.resize((60 , 30 ) , Image.ANTIALIAS)
off_new=ImageTk.PhotoImage(resized_off)
show_img=Image.open('F://show1.png')
show_res=show_img.resize((50 , 50))
result_img=ImageTk.PhotoImage(show_res)
dose_img=Image.open('F://dose.png')
dose_resized=dose_img.resize((50 , 50))
dose_final=ImageTk.PhotoImage(dose_resized)
power_img=Image.open('F://power.png')
power_res=power_img.resize((50 , 50))
power_final=ImageTk.PhotoImage(power_res) ```