usage: img2html [-h] [-b #RRGGBB] [-s 4~30] [-c CHAR] [-t TITLE] [-f FONT] -i
IN [-o OUT]
img2html : Convert image to HTML
optional arguments:
-b #RRGGBB, --background #RRGGBB background color (#RRGGBB format)
-s (4~30), --size (4~30) font size (int)
-c CHAR, --char CHAR characters
-t TITLE, --title TITLE html title
-f FONT, --font FONT html font
-i IN, --in IN image to convert
-o OUT, --out OUT output file
代码调用
fromimg2html.converterimportImg2HTMLConverterconverter=Img2HTMLConverter(*someconfighere*)
html=converter.convert(*image_path*)
# done, so easy.
请发表评论