Giter Site home page Giter Site logo

img2html's People

Contributors

elliotgao2 avatar xlzd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

img2html's Issues

Python3.54rc1 报错

jingwang@jingwang-pc:~$ sudo img2html -s 25 -c '' -t 'jing.wang' -i ~/Pictures/Wallpapers/174fea21dd2d2f0d99a8d9c5de412757.jpg  -o test.html
Traceback (most recent call last):
  File "/usr/local/bin/img2html", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/img2html/__init__.py", line 35, in main
    font_family=args.font,
  File "/usr/local/lib/python3.5/dist-packages/img2html/converter.py", line 73, in __init__
    char = char.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

characters 参数中文参数报错

progress: 100.00%root@DESKTOP-G3JIH3M:/mnt/c/Users/liguobao# img2html -c '伊' -s 10 -i ./yibaobao.jpg -o yibaobao.html
progress: 100.00%Traceback (most recent call last):
File "/usr/local/bin/img2html", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/img2html/init.py", line 37, in main
html = converter.convert(getattr(args, 'in'))
File "/usr/local/lib/python2.7/dist-packages/img2html/converter.py", line 89, in convert
return self.render(html_image)
File "/usr/local/lib/python2.7/dist-packages/img2html/converter.py", line 99, in render
width=self.font_size * len(html_image[0]) * 2
File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "", line 20, in top-level template code
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)

能详细说下咋配置码,想给女朋友惊喜..

我只会JAVA,刚刚把环境都配置好了,但是运行没报错,也没啥提示就改了一个地方
html = converter.convert(getattr(args, 'C:\123.png'))
然后RUN。结果

C:\Python27\python.exe C:/source/img2html-master/img2html/init.py

Process finished with exit code 0请问要咋弄啊。

python3.6下不可以用

D:\Workspace>img2html -i baby.jpg -o out.html
Traceback (most recent call last):
File "D:\Software\Python3_6\Scripts\img2html-script.py", line 11, in
load_entry_point('img2html==0.0.7', 'console_scripts', 'img2html')()
File "d:\software\python3_6\lib\site-packages\img2html_init_.py", line 35, in main
font_family=args.font,
File "d:\software\python3_6\lib\site-packages\img2html\converter.py", line 73, in init
char = char.decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.