I remember seeing a tutorial on OpenCV on making an imagine out of a multiline string.
Example :
"""
001000000
001000000
001000000
001000000
001000000
001000000
"""
That would produce a black pixel for every 0 in the string, and a white pixel for the 1s.
Please tell me if I can give you more information!
CodePudding user response:
Enlarge it to 100 pixels wide, invert and convert to PNG with ImageMagick like this:
magick image.pbm -negate -scale 100x result.png