How can i convert png image to binary 0 1 in python

102 Views Asked by At

Hello everyone how can i convert image to binary 0 and 1 like this :

give the image and convert it like this :

11111111111111111111111111
11111100111111111100111111
11110001111100111110001111
11000001111000011110000011
10000000111000011100000001
10000000000000000000000001
00000000000000000000000000
00000000000000000000000000
10000000000000000000000001
10000110001000010001100001
11001111111100111111110011
11100111111100111111100111
11111111111111111111111111

without using opencv

0

There are 0 best solutions below