Code: Select all
0 0 0 1 0 0 1 0 0 0
Code: Select all
0 0 0 1 1 1 1 0 0 0
I was thinking about converting to pbm format, then using regex, but the line breaks inside the pbm file make that harder than anticipated and I think I have to store the file data while I process it.
On a Mac, High Sierra, ImageMagick 7.0.8-14 Q16 x86_64.