mirror of
https://github.com/Astatin3/icon.git
synced 2026-06-08 16:18:10 -06:00
Crop images
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 588 KiB After Width: | Height: | Size: 673 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 829 KiB |
@@ -1,15 +1,17 @@
|
||||
import drawsvg as draw
|
||||
import math
|
||||
|
||||
size = 8192
|
||||
|
||||
GREEN = '#00ff00'
|
||||
BLACK = '#000000'
|
||||
WHITE = '#ffffff'
|
||||
|
||||
d = draw.Drawing(size*2, size*2, origin='center')
|
||||
#crop = (210/256)
|
||||
crop= 1
|
||||
size = 4096 / crop
|
||||
d = draw.Drawing(size*2*crop, size*2*crop, origin='center')
|
||||
|
||||
d.append(draw.Rectangle(-size, -size, size*2 ,size*2, fill=BLACK))
|
||||
d.append(draw.Rectangle(-size*crop, -size*crop, size*2*crop ,size*2*crop, fill=BLACK))
|
||||
|
||||
def draw_oct(r:float, c):
|
||||
r += r-r*math.sin(math.pi*0.625)
|
||||
@@ -93,4 +95,4 @@ d.save_png('icon.png')
|
||||
# img1 = cv2.imread("example.png")
|
||||
# img2 = cv2.imread("Astatin3-v4.png")
|
||||
|
||||
# cv2.imwrite("diff.png", img1+img2)
|
||||
# cv2.imwrite("diff.png", img1+img2)
|
||||
|
||||
Reference in New Issue
Block a user