Convert image to ANSI string The inspiration comes from here: https://github.com/JonnoFTW/img_term
pip install image2str
Please use a terminal that can display ANSI strings and TrueColor to run (example: WindowsTerminal)
Tramsform image path / img2str.url
class to ANSI string
parameters:
imageSrc: image path(str) or image url(img2str.url
)
newSize: Target image size(auto resize by value None
)
return: string after transforming
example:
image2String("readme-images/colortest.png", newSize=(50,50))
or this
image2String(url("https://i0.hdslb.com/bfs/article/03245d65e35b7573b6988c26a2a037903ef92896.png"), newSize=None)
tranform class mat.cv2
to ANSI string (Usage is similar to image2String(imageSrc, newSize=None)
)