-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeveloper.py
More file actions
84 lines (62 loc) · 3.21 KB
/
developer.py
File metadata and controls
84 lines (62 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
from tkinter import*
from tkinter import ttk
from train import Train
from PIL import Image,ImageTk
from student import Student
from train import Train
from face_recognition import Face_Recognition
from attendance import Attendance
import os
class Developer:
def __init__(self,root):
self.root=root
self.root.geometry("1366x768+0+0")
self.root.title("Face_Recogonition_System")
# This part is image labels setting start
# first header image
img=Image.open(r"C:\Users\Absul Sami\Documents\Python_Test_Projects\Images_GUI\banner.jpg")
img=img.resize((1366,130),Image.ANTIALIAS)
self.photoimg=ImageTk.PhotoImage(img)
# set image as lable
f_lb1 = Label(self.root,image=self.photoimg)
f_lb1.place(x=0,y=0,width=1366,height=130)
# backgorund image
bg1=Image.open(r"C:\Users\Absul Sami\Documents\Python_Test_Projects\Images_GUI\bg4.png")
bg1=bg1.resize((1366,768),Image.ANTIALIAS)
self.photobg1=ImageTk.PhotoImage(bg1)
# set image as lable
bg_img = Label(self.root,image=self.photobg1)
bg_img.place(x=0,y=130,width=1366,height=768)
#title section
title_lb1 = Label(bg_img,text="FYP Team",font=("verdana",30,"bold"),bg="white",fg="navyblue")
title_lb1.place(x=0,y=0,width=1366,height=45)
# Create buttons below the section
# -------------------------------------------------------------------------------------------------------------------
# student button 1
std_img_btn=Image.open(r"C:\Users\Absul Sami\Documents\Python_Test_Projects\Images_GUI\m.jpg")
std_img_btn=std_img_btn.resize((180,180),Image.ANTIALIAS)
self.std_img1=ImageTk.PhotoImage(std_img_btn)
std_b1 = Button(bg_img,image=self.std_img1,cursor="hand2")
std_b1.place(x=350,y=200,width=180,height=180)
std_b1_1 = Button(bg_img,text="Sami Mahar",cursor="hand2",font=("tahoma",15,"bold"),bg="white",fg="navyblue")
std_b1_1.place(x=350,y=380,width=180,height=45)
# Detect Face button 2
det_img_btn=Image.open(r"C:\Users\Absul Sami\Documents\Python_Test_Projects\Images_GUI\f.jpg")
det_img_btn=det_img_btn.resize((180,180),Image.ANTIALIAS)
self.det_img1=ImageTk.PhotoImage(det_img_btn)
det_b1 = Button(bg_img,image=self.det_img1,cursor="hand2",)
det_b1.place(x=580,y=200,width=180,height=180)
det_b1_1 = Button(bg_img,text="Mehran Memon",cursor="hand2",font=("tahoma",15,"bold"),bg="white",fg="navyblue")
det_b1_1.place(x=580,y=380,width=180,height=45)
# Attendance System button 3
att_img_btn=Image.open(r"C:\Users\Absul Sami\Documents\Python_Test_Projects\Images_GUI\w.jpg")
att_img_btn=att_img_btn.resize((180,180),Image.ANTIALIAS)
self.att_img1=ImageTk.PhotoImage(att_img_btn)
att_b1 = Button(bg_img,image=self.att_img1,cursor="hand2",)
att_b1.place(x=810,y=200,width=180,height=180)
att_b1_1 = Button(bg_img,text="Santosh Kumar",cursor="hand2",font=("tahoma",15,"bold"),bg="white",fg="navyblue")
att_b1_1.place(x=810,y=380,width=180,height=45)
if __name__ == "__main__":
root=Tk()
obj=Developer(root)
root.mainloop()