File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 16
16
17
17
import mpmath as mp
18
18
import matplotlib .pyplot as plt
19
- from matplotlib .transforms import Bbox
20
19
import numpy as np
21
20
from PIL import Image
22
- import sys
23
21
import os
24
22
25
23
mp .mp .dps = 1000 # increasing the precision of mpmath
@@ -103,7 +101,7 @@ def bmp_to_number(self, pic_path: str) -> mp.mpf:
103
101
# Indexed mode 2 bit
104
102
img = img .convert (mode = '1' )
105
103
106
- #Resizing and transposing
104
+ # Resizing and transposing
107
105
img = img .resize ((self .height , self .width ))
108
106
img = img .transpose (Image .ROTATE_270 )
109
107
@@ -113,7 +111,7 @@ def bmp_to_number(self, pic_path: str) -> mp.mpf:
113
111
for j in range (0 , self .width ):
114
112
bstr += str (int (img .getpixel ((j , i )) < 100 ))
115
113
116
- return mp .mpmathify (int (bstr , 2 ))* self .width
114
+ return mp .mpmathify (int (bstr , 2 )) * self .width
117
115
118
116
119
117
if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments