pixel-editing-lab 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pixel/__init__.py +5 -0
- pixel/app.py +260 -0
- pixel/layers.py +137 -0
- pixel/menus.py +162 -0
- pixel/toolbar.py +66 -0
- pixel/window.py +69 -0
- pixel/workspace.py +112 -0
- pixel_editing_lab-1.0.0.dist-info/METADATA +146 -0
- pixel_editing_lab-1.0.0.dist-info/RECORD +12 -0
- pixel_editing_lab-1.0.0.dist-info/WHEEL +5 -0
- pixel_editing_lab-1.0.0.dist-info/licenses/LICENSE +202 -0
- pixel_editing_lab-1.0.0.dist-info/top_level.txt +1 -0
pixel/__init__.py
ADDED
pixel/app.py
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import tkinter as tk
|
|
2
|
+
from tkinter import filedialog, messagebox, simpledialog
|
|
3
|
+
from PIL import Image
|
|
4
|
+
import os
|
|
5
|
+
|
|
6
|
+
from .window import MainWindow
|
|
7
|
+
from .toolbar import ToolBar
|
|
8
|
+
from .workspace import Workspace
|
|
9
|
+
from .layers import LayersPanel
|
|
10
|
+
from .menus import MenuBar
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Pixel:
|
|
14
|
+
|
|
15
|
+
def __init__(self, title="PIXEL - Image Editor", size="1200x750"):
|
|
16
|
+
|
|
17
|
+
self.root = tk.Tk()
|
|
18
|
+
self.root.title(title)
|
|
19
|
+
self.root.geometry(size)
|
|
20
|
+
self.root.minsize(900, 600)
|
|
21
|
+
self.root.configure(bg="#1e1e1e")
|
|
22
|
+
|
|
23
|
+
self.image = None
|
|
24
|
+
self.image_path = None
|
|
25
|
+
self.zoom = 1.0
|
|
26
|
+
self.current_tool = "Move"
|
|
27
|
+
|
|
28
|
+
self.main_window = MainWindow(self)
|
|
29
|
+
self.toolbar = ToolBar(self, self.main_window.left_panel)
|
|
30
|
+
self.workspace = Workspace(self, self.main_window.center_panel)
|
|
31
|
+
self.layers = LayersPanel(self, self.main_window.right_panel)
|
|
32
|
+
self.menu = MenuBar(self)
|
|
33
|
+
|
|
34
|
+
self.root.config(menu=self.menu.menu)
|
|
35
|
+
|
|
36
|
+
self.main_window.create_status_bar()
|
|
37
|
+
|
|
38
|
+
self.root.protocol("WM_DELETE_WINDOW", self.close)
|
|
39
|
+
|
|
40
|
+
def run(self):
|
|
41
|
+
self.root.mainloop()
|
|
42
|
+
|
|
43
|
+
def open(self):
|
|
44
|
+
|
|
45
|
+
path = filedialog.askopenfilename(
|
|
46
|
+
parent=self.root,
|
|
47
|
+
title="Open Image",
|
|
48
|
+
filetypes=[
|
|
49
|
+
("Image Files", "*.png *.jpg *.jpeg *.bmp *.webp *.tif *.tiff *.gif"),
|
|
50
|
+
("All Files", "*.*")
|
|
51
|
+
]
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
if not path:
|
|
55
|
+
return
|
|
56
|
+
|
|
57
|
+
try:
|
|
58
|
+
with Image.open(path) as source:
|
|
59
|
+
new_image = source.convert("RGBA")
|
|
60
|
+
|
|
61
|
+
self.image = new_image
|
|
62
|
+
self.image_path = path
|
|
63
|
+
self.zoom = 1.0
|
|
64
|
+
|
|
65
|
+
self.layers.reset()
|
|
66
|
+
self.workspace.display()
|
|
67
|
+
|
|
68
|
+
width, height = self.image.size
|
|
69
|
+
|
|
70
|
+
self.set_status(
|
|
71
|
+
f"Opened: {os.path.basename(path)} | {width} x {height}"
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
except (OSError, ValueError, Image.DecompressionBombError) as error:
|
|
75
|
+
|
|
76
|
+
messagebox.showerror(
|
|
77
|
+
"Open Error",
|
|
78
|
+
str(error),
|
|
79
|
+
parent=self.root
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
def new(self):
|
|
83
|
+
|
|
84
|
+
width = simpledialog.askinteger(
|
|
85
|
+
"New Image",
|
|
86
|
+
"Image Width:",
|
|
87
|
+
parent=self.root,
|
|
88
|
+
minvalue=1,
|
|
89
|
+
maxvalue=10000
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
if width is None:
|
|
93
|
+
return
|
|
94
|
+
|
|
95
|
+
height = simpledialog.askinteger(
|
|
96
|
+
"New Image",
|
|
97
|
+
"Image Height:",
|
|
98
|
+
parent=self.root,
|
|
99
|
+
minvalue=1,
|
|
100
|
+
maxvalue=10000
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
if height is None:
|
|
104
|
+
return
|
|
105
|
+
|
|
106
|
+
try:
|
|
107
|
+
new_image = Image.new(
|
|
108
|
+
"RGBA",
|
|
109
|
+
(width, height),
|
|
110
|
+
(255, 255, 255, 255)
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
self.image = new_image
|
|
114
|
+
self.image_path = None
|
|
115
|
+
self.zoom = 1.0
|
|
116
|
+
|
|
117
|
+
self.layers.reset()
|
|
118
|
+
self.workspace.display()
|
|
119
|
+
|
|
120
|
+
self.set_status(f"New Image | {width} x {height}")
|
|
121
|
+
|
|
122
|
+
except (ValueError, MemoryError) as error:
|
|
123
|
+
|
|
124
|
+
messagebox.showerror(
|
|
125
|
+
"Creation Error",
|
|
126
|
+
str(error),
|
|
127
|
+
parent=self.root
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
def save(self):
|
|
131
|
+
|
|
132
|
+
if self.image is None:
|
|
133
|
+
messagebox.showwarning(
|
|
134
|
+
"Warning",
|
|
135
|
+
"No image is open.",
|
|
136
|
+
parent=self.root
|
|
137
|
+
)
|
|
138
|
+
return
|
|
139
|
+
|
|
140
|
+
if self.image_path is None:
|
|
141
|
+
self.save_as()
|
|
142
|
+
return
|
|
143
|
+
|
|
144
|
+
self._save_to(self.image_path)
|
|
145
|
+
|
|
146
|
+
def save_as(self):
|
|
147
|
+
|
|
148
|
+
if self.image is None:
|
|
149
|
+
messagebox.showwarning(
|
|
150
|
+
"Warning",
|
|
151
|
+
"No image is open.",
|
|
152
|
+
parent=self.root
|
|
153
|
+
)
|
|
154
|
+
return
|
|
155
|
+
|
|
156
|
+
path = filedialog.asksaveasfilename(
|
|
157
|
+
parent=self.root,
|
|
158
|
+
title="Save Image",
|
|
159
|
+
defaultextension=".png",
|
|
160
|
+
filetypes=[
|
|
161
|
+
("PNG", "*.png"),
|
|
162
|
+
("JPEG", "*.jpg"),
|
|
163
|
+
("WEBP", "*.webp"),
|
|
164
|
+
("BMP", "*.bmp"),
|
|
165
|
+
("TIFF", "*.tiff")
|
|
166
|
+
]
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
if not path:
|
|
170
|
+
return
|
|
171
|
+
|
|
172
|
+
if os.path.splitext(path)[1].lower() not in {
|
|
173
|
+
".png", ".jpg", ".jpeg", ".webp",
|
|
174
|
+
".bmp", ".tif", ".tiff"
|
|
175
|
+
}:
|
|
176
|
+
messagebox.showerror(
|
|
177
|
+
"Format Error",
|
|
178
|
+
"Unsupported image format.",
|
|
179
|
+
parent=self.root
|
|
180
|
+
)
|
|
181
|
+
return
|
|
182
|
+
|
|
183
|
+
if self._save_to(path):
|
|
184
|
+
self.image_path = path
|
|
185
|
+
|
|
186
|
+
def _save_to(self, path):
|
|
187
|
+
|
|
188
|
+
try:
|
|
189
|
+
extension = os.path.splitext(path)[1].lower()
|
|
190
|
+
|
|
191
|
+
if extension in (".jpg", ".jpeg"):
|
|
192
|
+
self.image.convert("RGB").save(
|
|
193
|
+
path,
|
|
194
|
+
format="JPEG",
|
|
195
|
+
quality=95
|
|
196
|
+
)
|
|
197
|
+
else:
|
|
198
|
+
self.image.save(path)
|
|
199
|
+
|
|
200
|
+
self.set_status(f"Saved: {os.path.basename(path)}")
|
|
201
|
+
return True
|
|
202
|
+
|
|
203
|
+
except (OSError, ValueError) as error:
|
|
204
|
+
|
|
205
|
+
messagebox.showerror(
|
|
206
|
+
"Save Error",
|
|
207
|
+
str(error),
|
|
208
|
+
parent=self.root
|
|
209
|
+
)
|
|
210
|
+
return False
|
|
211
|
+
|
|
212
|
+
def set_tool(self, tool):
|
|
213
|
+
|
|
214
|
+
self.current_tool = tool
|
|
215
|
+
self.set_status(f"Selected Tool: {tool}")
|
|
216
|
+
|
|
217
|
+
def zoom_in(self):
|
|
218
|
+
|
|
219
|
+
if self.image is None:
|
|
220
|
+
return
|
|
221
|
+
|
|
222
|
+
self.zoom = min(self.zoom * 1.25, 8.0)
|
|
223
|
+
self.workspace.display()
|
|
224
|
+
|
|
225
|
+
self.set_status(f"Zoom: {self.zoom * 100:.0f}%")
|
|
226
|
+
|
|
227
|
+
def zoom_out(self):
|
|
228
|
+
|
|
229
|
+
if self.image is None:
|
|
230
|
+
return
|
|
231
|
+
|
|
232
|
+
self.zoom = max(self.zoom / 1.25, 0.05)
|
|
233
|
+
self.workspace.display()
|
|
234
|
+
|
|
235
|
+
self.set_status(f"Zoom: {self.zoom * 100:.0f}%")
|
|
236
|
+
|
|
237
|
+
def fit_image(self):
|
|
238
|
+
|
|
239
|
+
if self.image is None:
|
|
240
|
+
return
|
|
241
|
+
|
|
242
|
+
self.workspace.fit_image()
|
|
243
|
+
|
|
244
|
+
def set_status(self, text):
|
|
245
|
+
|
|
246
|
+
self.main_window.status.config(text=text)
|
|
247
|
+
|
|
248
|
+
def about(self):
|
|
249
|
+
|
|
250
|
+
messagebox.showinfo(
|
|
251
|
+
"About PIXEL",
|
|
252
|
+
"PIXEL\n"
|
|
253
|
+
"Professional Image eXploration & Editing Lab\n\n"
|
|
254
|
+
"Version 1.0.0\n"
|
|
255
|
+
"Python Image Editor",
|
|
256
|
+
parent=self.root
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
def close(self):
|
|
260
|
+
self.root.destroy()
|
pixel/layers.py
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import tkinter as tk
|
|
2
|
+
from tkinter import messagebox
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class LayersPanel:
|
|
6
|
+
|
|
7
|
+
def __init__(self, app, parent):
|
|
8
|
+
|
|
9
|
+
self.app = app
|
|
10
|
+
self.parent = parent
|
|
11
|
+
|
|
12
|
+
tk.Label(
|
|
13
|
+
parent,
|
|
14
|
+
text="LAYERS",
|
|
15
|
+
bg="#252525",
|
|
16
|
+
fg="white",
|
|
17
|
+
font=("Arial", 11, "bold")
|
|
18
|
+
).pack(
|
|
19
|
+
anchor="w",
|
|
20
|
+
padx=12,
|
|
21
|
+
pady=15
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
self.listbox = tk.Listbox(
|
|
25
|
+
parent,
|
|
26
|
+
bg="#353535",
|
|
27
|
+
fg="white",
|
|
28
|
+
selectbackground="#555555",
|
|
29
|
+
selectforeground="white",
|
|
30
|
+
relief="flat",
|
|
31
|
+
highlightthickness=0,
|
|
32
|
+
font=("Arial", 10)
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
self.listbox.pack(
|
|
36
|
+
fill="x",
|
|
37
|
+
padx=10,
|
|
38
|
+
pady=5
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
self.listbox.insert("end", "Background")
|
|
42
|
+
self.listbox.selection_set(0)
|
|
43
|
+
|
|
44
|
+
buttons = tk.Frame(
|
|
45
|
+
parent,
|
|
46
|
+
bg="#252525"
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
buttons.pack(
|
|
50
|
+
fill="x",
|
|
51
|
+
padx=8,
|
|
52
|
+
pady=10
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
tk.Button(
|
|
56
|
+
buttons,
|
|
57
|
+
text="+ New",
|
|
58
|
+
command=self.add,
|
|
59
|
+
bg="#353535",
|
|
60
|
+
fg="white",
|
|
61
|
+
relief="flat"
|
|
62
|
+
).pack(
|
|
63
|
+
side="left",
|
|
64
|
+
fill="x",
|
|
65
|
+
expand=True,
|
|
66
|
+
padx=2
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
tk.Button(
|
|
70
|
+
buttons,
|
|
71
|
+
text="- Delete",
|
|
72
|
+
command=self.delete,
|
|
73
|
+
bg="#353535",
|
|
74
|
+
fg="white",
|
|
75
|
+
relief="flat"
|
|
76
|
+
).pack(
|
|
77
|
+
side="left",
|
|
78
|
+
fill="x",
|
|
79
|
+
expand=True,
|
|
80
|
+
padx=2
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
tk.Label(
|
|
84
|
+
parent,
|
|
85
|
+
text="PROPERTIES",
|
|
86
|
+
bg="#252525",
|
|
87
|
+
fg="white",
|
|
88
|
+
font=("Arial", 11, "bold")
|
|
89
|
+
).pack(
|
|
90
|
+
anchor="w",
|
|
91
|
+
padx=12,
|
|
92
|
+
pady=20
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
def reset(self):
|
|
96
|
+
|
|
97
|
+
self.listbox.delete(0, "end")
|
|
98
|
+
self.listbox.insert("end", "Background")
|
|
99
|
+
self.listbox.selection_set(0)
|
|
100
|
+
|
|
101
|
+
def add(self):
|
|
102
|
+
|
|
103
|
+
count = self.listbox.size()
|
|
104
|
+
|
|
105
|
+
self.listbox.insert(
|
|
106
|
+
"end",
|
|
107
|
+
f"Layer {count}"
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
self.listbox.selection_clear(0, "end")
|
|
111
|
+
self.listbox.selection_set("end")
|
|
112
|
+
|
|
113
|
+
def delete(self):
|
|
114
|
+
|
|
115
|
+
selected = self.listbox.curselection()
|
|
116
|
+
|
|
117
|
+
if not selected:
|
|
118
|
+
return
|
|
119
|
+
|
|
120
|
+
if self.listbox.size() <= 1:
|
|
121
|
+
|
|
122
|
+
messagebox.showwarning(
|
|
123
|
+
"Warning",
|
|
124
|
+
"At least one layer must remain.",
|
|
125
|
+
parent=self.app.root
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
return
|
|
129
|
+
|
|
130
|
+
self.listbox.delete(selected[0])
|
|
131
|
+
|
|
132
|
+
self.listbox.selection_set(
|
|
133
|
+
min(
|
|
134
|
+
selected[0],
|
|
135
|
+
self.listbox.size() - 1
|
|
136
|
+
)
|
|
137
|
+
)
|
pixel/menus.py
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import tkinter as tk
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class MenuBar:
|
|
5
|
+
|
|
6
|
+
def __init__(self, app):
|
|
7
|
+
|
|
8
|
+
self.app = app
|
|
9
|
+
|
|
10
|
+
self.menu = tk.Menu(
|
|
11
|
+
app.root,
|
|
12
|
+
bg="#292929",
|
|
13
|
+
fg="white",
|
|
14
|
+
activebackground="#505050",
|
|
15
|
+
activeforeground="white"
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
self.create_file_menu()
|
|
19
|
+
self.create_edit_menu()
|
|
20
|
+
self.create_image_menu()
|
|
21
|
+
self.create_layer_menu()
|
|
22
|
+
self.create_select_menu()
|
|
23
|
+
self.create_filter_menu()
|
|
24
|
+
self.create_view_menu()
|
|
25
|
+
self.create_help_menu()
|
|
26
|
+
|
|
27
|
+
def add_menu(self, name):
|
|
28
|
+
|
|
29
|
+
menu = tk.Menu(
|
|
30
|
+
self.menu,
|
|
31
|
+
tearoff=0,
|
|
32
|
+
bg="#292929",
|
|
33
|
+
fg="white",
|
|
34
|
+
activebackground="#505050",
|
|
35
|
+
activeforeground="white"
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
self.menu.add_cascade(
|
|
39
|
+
label=name,
|
|
40
|
+
menu=menu
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
return menu
|
|
44
|
+
|
|
45
|
+
def create_file_menu(self):
|
|
46
|
+
|
|
47
|
+
menu = self.add_menu("File")
|
|
48
|
+
|
|
49
|
+
menu.add_command(
|
|
50
|
+
label="New",
|
|
51
|
+
command=self.app.new
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
menu.add_command(
|
|
55
|
+
label="Open",
|
|
56
|
+
command=self.app.open
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
menu.add_command(
|
|
60
|
+
label="Save",
|
|
61
|
+
command=self.app.save
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
menu.add_command(
|
|
65
|
+
label="Save As",
|
|
66
|
+
command=self.app.save_as
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
menu.add_separator()
|
|
70
|
+
|
|
71
|
+
menu.add_command(
|
|
72
|
+
label="Exit",
|
|
73
|
+
command=self.app.close
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
def create_edit_menu(self):
|
|
77
|
+
|
|
78
|
+
menu = self.add_menu("Edit")
|
|
79
|
+
|
|
80
|
+
menu.add_command(
|
|
81
|
+
label="Undo",
|
|
82
|
+
state="disabled"
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
menu.add_command(
|
|
86
|
+
label="Redo",
|
|
87
|
+
state="disabled"
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
def create_image_menu(self):
|
|
91
|
+
|
|
92
|
+
menu = self.add_menu("Image")
|
|
93
|
+
|
|
94
|
+
menu.add_command(
|
|
95
|
+
label="Image Size",
|
|
96
|
+
state="disabled"
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
menu.add_command(
|
|
100
|
+
label="Rotate",
|
|
101
|
+
state="disabled"
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
def create_layer_menu(self):
|
|
105
|
+
|
|
106
|
+
menu = self.add_menu("Layer")
|
|
107
|
+
|
|
108
|
+
menu.add_command(
|
|
109
|
+
label="New Layer",
|
|
110
|
+
command=self.app.layers.add
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
menu.add_command(
|
|
114
|
+
label="Delete Layer",
|
|
115
|
+
command=self.app.layers.delete
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
def create_select_menu(self):
|
|
119
|
+
|
|
120
|
+
menu = self.add_menu("Select")
|
|
121
|
+
|
|
122
|
+
menu.add_command(
|
|
123
|
+
label="Select All",
|
|
124
|
+
state="disabled"
|
|
125
|
+
)
|
|
126
|
+
|
|
127
|
+
def create_filter_menu(self):
|
|
128
|
+
|
|
129
|
+
menu = self.add_menu("Filter")
|
|
130
|
+
|
|
131
|
+
menu.add_command(
|
|
132
|
+
label="Filters",
|
|
133
|
+
state="disabled"
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
def create_view_menu(self):
|
|
137
|
+
|
|
138
|
+
menu = self.add_menu("View")
|
|
139
|
+
|
|
140
|
+
menu.add_command(
|
|
141
|
+
label="Zoom In",
|
|
142
|
+
command=self.app.zoom_in
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
menu.add_command(
|
|
146
|
+
label="Zoom Out",
|
|
147
|
+
command=self.app.zoom_out
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
menu.add_command(
|
|
151
|
+
label="Fit Image",
|
|
152
|
+
command=self.app.fit_image
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
def create_help_menu(self):
|
|
156
|
+
|
|
157
|
+
menu = self.add_menu("Help")
|
|
158
|
+
|
|
159
|
+
menu.add_command(
|
|
160
|
+
label="About PIXEL",
|
|
161
|
+
command=self.app.about
|
|
162
|
+
)
|
pixel/toolbar.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import tkinter as tk
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ToolBar:
|
|
5
|
+
|
|
6
|
+
def __init__(self, app, parent):
|
|
7
|
+
|
|
8
|
+
self.app = app
|
|
9
|
+
self.parent = parent
|
|
10
|
+
self.buttons = {}
|
|
11
|
+
|
|
12
|
+
tk.Label(
|
|
13
|
+
parent,
|
|
14
|
+
text="TOOLS",
|
|
15
|
+
bg="#252525",
|
|
16
|
+
fg="#aaaaaa",
|
|
17
|
+
font=("Arial", 9, "bold")
|
|
18
|
+
).pack(pady=12)
|
|
19
|
+
|
|
20
|
+
tools = [
|
|
21
|
+
"Move",
|
|
22
|
+
"Select",
|
|
23
|
+
"Brush",
|
|
24
|
+
"Eraser",
|
|
25
|
+
"Crop",
|
|
26
|
+
"Text",
|
|
27
|
+
"Rectangle",
|
|
28
|
+
"Ellipse",
|
|
29
|
+
"Zoom",
|
|
30
|
+
"Color"
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
for tool in tools:
|
|
34
|
+
|
|
35
|
+
button = tk.Button(
|
|
36
|
+
parent,
|
|
37
|
+
text=tool,
|
|
38
|
+
command=lambda name=tool: self.select_tool(name),
|
|
39
|
+
bg="#353535",
|
|
40
|
+
fg="white",
|
|
41
|
+
activebackground="#505050",
|
|
42
|
+
activeforeground="white",
|
|
43
|
+
relief="flat",
|
|
44
|
+
font=("Arial", 9),
|
|
45
|
+
cursor="hand2"
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
button.pack(
|
|
49
|
+
fill="x",
|
|
50
|
+
padx=5,
|
|
51
|
+
pady=3,
|
|
52
|
+
ipady=5
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
self.buttons[tool] = button
|
|
56
|
+
|
|
57
|
+
def select_tool(self, tool):
|
|
58
|
+
|
|
59
|
+
self.app.set_tool(tool)
|
|
60
|
+
|
|
61
|
+
for name, button in self.buttons.items():
|
|
62
|
+
|
|
63
|
+
if name == tool:
|
|
64
|
+
button.config(bg="#555555")
|
|
65
|
+
else:
|
|
66
|
+
button.config(bg="#353535")
|
pixel/window.py
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import tkinter as tk
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class MainWindow:
|
|
5
|
+
|
|
6
|
+
def __init__(self, app):
|
|
7
|
+
|
|
8
|
+
self.app = app
|
|
9
|
+
self.root = app.root
|
|
10
|
+
|
|
11
|
+
self.main_frame = tk.Frame(
|
|
12
|
+
self.root,
|
|
13
|
+
bg="#1e1e1e"
|
|
14
|
+
)
|
|
15
|
+
self.main_frame.pack(
|
|
16
|
+
fill="both",
|
|
17
|
+
expand=True
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
self.left_panel = tk.Frame(
|
|
21
|
+
self.main_frame,
|
|
22
|
+
bg="#252525",
|
|
23
|
+
width=75
|
|
24
|
+
)
|
|
25
|
+
self.left_panel.pack(
|
|
26
|
+
side="left",
|
|
27
|
+
fill="y"
|
|
28
|
+
)
|
|
29
|
+
self.left_panel.pack_propagate(False)
|
|
30
|
+
|
|
31
|
+
self.center_panel = tk.Frame(
|
|
32
|
+
self.main_frame,
|
|
33
|
+
bg="#181818"
|
|
34
|
+
)
|
|
35
|
+
self.center_panel.pack(
|
|
36
|
+
side="left",
|
|
37
|
+
fill="both",
|
|
38
|
+
expand=True
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
self.right_panel = tk.Frame(
|
|
42
|
+
self.main_frame,
|
|
43
|
+
bg="#252525",
|
|
44
|
+
width=230
|
|
45
|
+
)
|
|
46
|
+
self.right_panel.pack(
|
|
47
|
+
side="right",
|
|
48
|
+
fill="y"
|
|
49
|
+
)
|
|
50
|
+
self.right_panel.pack_propagate(False)
|
|
51
|
+
|
|
52
|
+
self.status = None
|
|
53
|
+
|
|
54
|
+
def create_status_bar(self):
|
|
55
|
+
|
|
56
|
+
self.status = tk.Label(
|
|
57
|
+
self.root,
|
|
58
|
+
text="Ready | PIXEL",
|
|
59
|
+
bg="#292929",
|
|
60
|
+
fg="#bbbbbb",
|
|
61
|
+
anchor="w",
|
|
62
|
+
padx=10,
|
|
63
|
+
font=("Arial", 9)
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
self.status.pack(
|
|
67
|
+
side="bottom",
|
|
68
|
+
fill="x"
|
|
69
|
+
)
|
pixel/workspace.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import tkinter as tk
|
|
2
|
+
from PIL import Image, ImageTk
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Workspace:
|
|
6
|
+
|
|
7
|
+
def __init__(self, app, parent):
|
|
8
|
+
|
|
9
|
+
self.app = app
|
|
10
|
+
self.parent = parent
|
|
11
|
+
|
|
12
|
+
self.photo = None
|
|
13
|
+
self.image_id = None
|
|
14
|
+
|
|
15
|
+
self.canvas = tk.Canvas(
|
|
16
|
+
parent,
|
|
17
|
+
bg="#181818",
|
|
18
|
+
highlightthickness=0
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
self.canvas.pack(
|
|
22
|
+
fill="both",
|
|
23
|
+
expand=True,
|
|
24
|
+
padx=10,
|
|
25
|
+
pady=10
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
self.canvas.bind(
|
|
29
|
+
"<Configure>",
|
|
30
|
+
self.on_resize
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
def on_resize(self, event=None):
|
|
34
|
+
|
|
35
|
+
self.display()
|
|
36
|
+
|
|
37
|
+
def display(self):
|
|
38
|
+
|
|
39
|
+
image = self.app.image
|
|
40
|
+
|
|
41
|
+
if image is None:
|
|
42
|
+
self.canvas.delete("all")
|
|
43
|
+
self.photo = None
|
|
44
|
+
self.image_id = None
|
|
45
|
+
return
|
|
46
|
+
|
|
47
|
+
canvas_width = self.canvas.winfo_width()
|
|
48
|
+
canvas_height = self.canvas.winfo_height()
|
|
49
|
+
|
|
50
|
+
if canvas_width < 10 or canvas_height < 10:
|
|
51
|
+
return
|
|
52
|
+
|
|
53
|
+
try:
|
|
54
|
+
|
|
55
|
+
width = max(
|
|
56
|
+
1,
|
|
57
|
+
int(image.width * self.app.zoom)
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
height = max(
|
|
61
|
+
1,
|
|
62
|
+
int(image.height * self.app.zoom)
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
preview = image.resize(
|
|
66
|
+
(width, height),
|
|
67
|
+
Image.Resampling.LANCZOS
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
self.photo = ImageTk.PhotoImage(preview)
|
|
71
|
+
|
|
72
|
+
self.canvas.delete("all")
|
|
73
|
+
|
|
74
|
+
self.image_id = self.canvas.create_image(
|
|
75
|
+
canvas_width // 2,
|
|
76
|
+
canvas_height // 2,
|
|
77
|
+
image=self.photo,
|
|
78
|
+
anchor="center"
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
self.canvas.config(
|
|
82
|
+
scrollregion=self.canvas.bbox("all")
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
except (tk.TclError, ValueError, OSError) as error:
|
|
86
|
+
|
|
87
|
+
self.app.set_status(
|
|
88
|
+
f"Display Error: {error}"
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
def fit_image(self):
|
|
92
|
+
|
|
93
|
+
image = self.app.image
|
|
94
|
+
|
|
95
|
+
if image is None:
|
|
96
|
+
return
|
|
97
|
+
|
|
98
|
+
canvas_width = self.canvas.winfo_width() - 30
|
|
99
|
+
canvas_height = self.canvas.winfo_height() - 30
|
|
100
|
+
|
|
101
|
+
if canvas_width <= 0 or canvas_height <= 0:
|
|
102
|
+
return
|
|
103
|
+
|
|
104
|
+
self.app.zoom = min(
|
|
105
|
+
canvas_width / image.width,
|
|
106
|
+
canvas_height / image.height,
|
|
107
|
+
1.0
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
self.display()
|
|
111
|
+
|
|
112
|
+
self.app.set_status("Image fitted to workspace.")
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pixel-editing-lab
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: PIXEL - Professional Image eXploration & Editing Lab
|
|
5
|
+
Author: karan.rf
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Keywords: pixel,image-editor,photo-editor,image-processing,python,tkinter,pillow
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: Pillow>=10.0.0
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
# 🎨 PIXEL
|
|
27
|
+
|
|
28
|
+
### Professional Image eXploration & Editing Lab
|
|
29
|
+
|
|
30
|
+
\<p align="center"> \<strong>🖼️ Explore. Create. Edit.\</strong> \<br> A Python-powered desktop image editing application. \</p>
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 🌟 About PIXEL
|
|
35
|
+
|
|
36
|
+
**PIXEL** is a Python-based image editing application designed to provide an intuitive and practical desktop environment for exploring, managing, and editing images.
|
|
37
|
+
|
|
38
|
+
Built with Python and Tkinter, PIXEL aims to bring essential image editing capabilities together in an organized and user-friendly application.
|
|
39
|
+
|
|
40
|
+
## ✨ Key Features
|
|
41
|
+
|
|
42
|
+
- 🖼️ **Image Workspace** — A dedicated environment for working with images.
|
|
43
|
+
- 🛠️ **Editing Toolbar** — Quick access to editing tools.
|
|
44
|
+
- 📚 **Layer Management** — Organized layer handling.
|
|
45
|
+
- 🪟 **Desktop Interface** — Graphical user interface powered by Tkinter.
|
|
46
|
+
- 🎨 **Image Processing** — Image processing capabilities powered by Pillow.
|
|
47
|
+
- 🧩 **Modular Architecture** — Organized and maintainable application design.
|
|
48
|
+
|
|
49
|
+
## 📋 Requirements
|
|
50
|
+
|
|
51
|
+
| Requirement | Version |
|
|
52
|
+
| ----------- | -------- |
|
|
53
|
+
| 🐍 Python | 3.8+ |
|
|
54
|
+
| 🖼️ Pillow | 10.0.0+ |
|
|
55
|
+
| 🪟 Tkinter | Required |
|
|
56
|
+
|
|
57
|
+
## 🚀 Installation
|
|
58
|
+
|
|
59
|
+
Install PIXEL directly using pip:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pip install pixel-editing-lab
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## 💻 Quick Start
|
|
66
|
+
|
|
67
|
+
Getting started with PIXEL is simple:
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from pixel import Pixel
|
|
71
|
+
|
|
72
|
+
app = Pixel()
|
|
73
|
+
app.run()
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## ⚙️ Package Information
|
|
77
|
+
|
|
78
|
+
| Property | Details |
|
|
79
|
+
| ----------------- | ------------------- |
|
|
80
|
+
| 📦 Package | `pixel-editing-lab` |
|
|
81
|
+
| 🎨 Application | PIXEL |
|
|
82
|
+
| 🔢 Version | `1.0.0` |
|
|
83
|
+
| 🐍 Python Support | `>=3.8` |
|
|
84
|
+
| 🖼️ Dependency | Pillow |
|
|
85
|
+
| 📜 License | Apache-2.0 |
|
|
86
|
+
| 👨💻 Author | `karan.rf` |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 🔄 Updating PIXEL
|
|
91
|
+
|
|
92
|
+
To upgrade PIXEL to the latest available version, run:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
pip install --upgrade pixel-editing-lab
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
To check your currently installed version:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
pip show pixel-editing-lab
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## 🧰 Related Project: imgtoolpro
|
|
105
|
+
|
|
106
|
+
**imgtoolpro** is a Python image processing toolkit developed by the same author.
|
|
107
|
+
|
|
108
|
+
It provides a collection of practical image processing utilities, including:
|
|
109
|
+
|
|
110
|
+
- 🔄 Image format conversion
|
|
111
|
+
- 📦 Image compression
|
|
112
|
+
- 🎨 Image filters
|
|
113
|
+
- ✂️ Image editing operations
|
|
114
|
+
- 🎞️ Animation processing
|
|
115
|
+
- 🔍 Image inspection and metadata analysis
|
|
116
|
+
- 🖼️ Image upscaling and downscaling
|
|
117
|
+
|
|
118
|
+
While PIXEL focuses on desktop image editing, imgtoolpro provides reusable image processing utilities for Python developers.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 📜 License
|
|
123
|
+
|
|
124
|
+
PIXEL is distributed under the **Apache License 2.0**.
|
|
125
|
+
|
|
126
|
+
See the [LICENSE](LICENSE) file for complete license information.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 🙏 Acknowledgements
|
|
131
|
+
|
|
132
|
+
Special thanks to the developers and maintainers of **Python, Tkinter, and Pillow** for providing the tools and technologies that make PIXEL possible.
|
|
133
|
+
|
|
134
|
+
Thanks to everyone who supports the project, shares feedback, and helps it improve. ❤️
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 👨💻 Author
|
|
139
|
+
|
|
140
|
+
**karan.rf**
|
|
141
|
+
|
|
142
|
+
*Created with passion and built with Python.*
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
\<p align="center"> \<strong>🎨 PIXEL\</strong> \<br> \<i>Explore • Create • Edit\</i> \<br>\<br> Thank you for being part of the journey! ❤️ \</p>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
pixel/__init__.py,sha256=E2DEeoDRRvZHnmXt_uZDyzLIGyqMIBg5keGPm1l1zmA,70
|
|
2
|
+
pixel/app.py,sha256=5BnU5i9Tb5po5qamRMCVyajK2-OGNKnR3RDekLSfRUc,6549
|
|
3
|
+
pixel/layers.py,sha256=Lun1sOq0Df6ztFEGfXyrzbfLd7F4X00cK3Ax5bFrUaY,2946
|
|
4
|
+
pixel/menus.py,sha256=DsmMt7FazzeCzX1PLKJOUDa6I_nZ_Q4sdjGjd6YDSgQ,3363
|
|
5
|
+
pixel/toolbar.py,sha256=4xIzxB_eWhvXvXP_c22GP2Ct4AgMehuWuOVEALUmH7c,1506
|
|
6
|
+
pixel/window.py,sha256=fgGyUYujitGqcqnAco8VC_OQRyX6PYJ4DZCs_FktL74,1483
|
|
7
|
+
pixel/workspace.py,sha256=GHSm50QskqEwtCCNZxz8aDpU3Wv28NEIgBIsmvpbYy0,2523
|
|
8
|
+
pixel_editing_lab-1.0.0.dist-info/licenses/LICENSE,sha256=ofhDAKHBnvCKwh8ImgdSK7XhoPZ6ME52h1WtjFPqK-w,11539
|
|
9
|
+
pixel_editing_lab-1.0.0.dist-info/METADATA,sha256=_9H797wQw_fH2hXuyPS5dBXhua3UvetKghasS34iOtU,4436
|
|
10
|
+
pixel_editing_lab-1.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
11
|
+
pixel_editing_lab-1.0.0.dist-info/top_level.txt,sha256=RAuBKMFH89apJVK2x9JS-XYBLfkxfSTGM8NRbzmcSdg,6
|
|
12
|
+
pixel_editing_lab-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 karan.rf
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pixel
|