Coder Social home page Coder Social logo

pic2char's Introduction

pic2char

将微信好友头像拼接成汉字;拼图成字

代码说明: wx2char.py用来扫码登录微信,获取微信好友头像存储到本地,将头像图片拼接成inpt = "二零一九新年快乐!"中的文本内容。 1.需要先安装PIL和itchat库 2.运行代码时需要扫码登录微信网页版 3.目前点阵库是依靠汉字库实现的,即文件夹中的HZK16文件,输入文本时要求是汉字和中文标点,否则可能导致报错 4.若出现“有1位朋友的头像读取失败,已使用本人头像替代”字样,是正常现象,因为有的微信好友头像格式问题获取不到

pic2char.py是假设你想用别的图片来组成文字图片,无需获取微信头像,直接输入汉字用图片来拼接展示 1.需要PIL库 2.需要HZK16文件来获取汉字点阵信息 3.运行代码前,要将图片文件夹放到代码文件夹中,将代码中的user="TED"改为文件夹名称,同时准备一张备用图片将路径赋值给self用作读取图片失败时备选替代

使用说明: 拿到代码后,可以选择修改wx2char.py中要输出的文本内容,保存后直接运行,会跳出二维码图片,扫码登录微信网页版,生成微信好友头像的文件夹(例如:TED文件夹),本人的微信头像(TED.jpg),和最终结果图片的文件夹(TED_output)

因为如果好友数目太多会导致读取微信头像耗时较长,所以准备了pic2char.py用来玩把图片转成汉字的功能,提前准备好图片文件夹和一张备用图片,在代码中对应修改好即可运行

pic2char's People

Contributors

pengfexue2 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

Watchers

 avatar

pic2char's Issues

Traceback (most recent call last):

开始读取199位好友头像...
已读取100位好友头像,请耐心等待~
读取好友头像完毕!
Traceback (most recent call last):
File "/Users/huangyao/Downloads/pic2char-master/wx2char.py", line 212, in
head2char(workspace,user,self,outlist)
File "/Users/huangyao/Downloads/pic2char-master/wx2char.py", line 103, in head2char
os.chdir(folder)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/huangyao/Downloads/pic2char-master\Lucas'

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.