CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 00:18:02 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=6d176a73be4d72897c1298da91a659d48957dfc3a7a842f2ca36ca7a0718e55aa%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22L9pxn5ZS11_yjta9hmzY0AsTWt9xQw24%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d26ae8bc43c537-BLR
# tk_4_canvas_masks.py - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # tk_4_canvas_masks.py
- import tkinter as tk
- from PIL import Image, ImageTk, ImageDraw
- WW, HH = 640, 640
- WW2, HH2 = WW*2, HH*2
- LINE_SPACING = 2
- root = tk.Tk()
- canvas = tk.Canvas(root, width=WW-1, height=HH-1, bg='black')
- canvas.pack()
- img1 = Image.new("RGBA", (WW2, HH2), (255, 0, 0, 255))
- img2 = Image.new("RGBA", (WW2, HH2), (0, 255, 0, 255))
- img3 = Image.new("RGBA", (WW2, HH2), (0, 0, 255, 255))
- img4 = Image.new("RGBA", (WW2, HH2), (255, 255, 0, 255))
- tile_size = 32
- tile = Image.new("L", (tile_size, tile_size), 255)
- draw_tile = ImageDraw.Draw(tile)
- for x in range(0, tile_size, LINE_SPACING):
- draw_tile.line((x, 0, x, tile_size), fill=0)
- for y in range(0, tile_size, LINE_SPACING):
- draw_tile.line((0, y, tile_size, y), fill=0)
- mask = Image.new("L", (WW2, HH2), 255)
- for y in range(0, HH2+tile_size, tile_size):
- for x in range(0, WW2+tile_size, tile_size):
- mask.paste(tile, (x, y))
- combined = Image.new("RGBA", (WW2, HH2))
- combined.paste(img1, (0, 0), mask)
- combined.paste(img2, (1, 0), mask)
- combined.paste(img3, (0, 1), mask)
- combined.paste(img4, (1, 1), mask)
- crop_region = (64, 64, 128, 128)
- cropped = combined.crop(crop_region)
- resized = cropped.resize((WW, HH), resample=Image.NEAREST)
- tk_img = ImageTk.PhotoImage(resized)
- canvas.create_image(1, 1, image=tk_img, anchor='nw')
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ S
JavaScript | 1 sec ago | 0.25 KB
-
📝 MAKE $2500 IN 15 MIN ✅ Working
JavaScript | 3 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ F
JavaScript | 10 sec ago | 0.25 KB
-
💵 Make 3000$ in 20 minutes 💵
JavaScript | 12 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ E
JavaScript | 15 sec ago | 0.25 KB
-
⭐✅ Swapzone Glitch ✅ Working ⭐⭐ L
JavaScript | 19 sec ago | 0.25 KB
-
📌 Swapzone +37% glitch
JavaScript | 21 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ 3
JavaScript | 26 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand