62
62
w , h = image .size
63
63
pixels = image .load ()
64
64
65
- outputImage = Image .new ("RGB" , (charWidth * w , charHeight * h ), color = (0 , 0 , 0 ))
65
+ outputImage = Image .new (
66
+ "RGB" , (charWidth * w , charHeight * h ), color = (0 , 0 , 0 ))
66
67
draw = ImageDraw .Draw (outputImage )
67
68
68
69
@@ -79,14 +80,15 @@ def getSomeChar(h):
79
80
r , g , b = p [0 ], p [1 ], p [2 ]
80
81
grey = int ((r / 3 + g / 3 + b / 3 ))
81
82
pixels [j , i ] = (grey , grey , grey )
82
- draw .text ((j * charWidth , i * charHeight ), getSomeChar (grey ), fill = (r , g , b ))
83
+ draw .text ((j * charWidth , i * charHeight ),
84
+ getSomeChar (grey ), fill = (r , g , b ))
83
85
print (getSomeChar (grey ), end = "" )
84
86
print ("" )
85
87
86
88
if charHeight > 25 or charWidth > 40 :
87
89
print (
88
90
"WARNING: Custom resolution exceeds maximum 25*40 (height*width). See: \n "
89
- "https://github.com/o2sh/onefetch/blob/master /CONTRIBUTING.md#ascii-logo"
91
+ "https://github.com/o2sh/onefetch/blob/main /CONTRIBUTING.md#ascii-logo"
90
92
)
91
93
92
94
0 commit comments