通过ichat库爬取朋友圈头像,将头像拼成一个‘猪’字。
制作思路:
从带猪字的图像的原点(0,0)开始遍历,将小于255的像素点全部记录下来(前提是图形的背景色是白的),计算占整个图片的多少,再根据需要拼接头像的多少计算出每个头像的大小。
新建一张白色图片,按照小于255的点,粘贴头像图片。
我这里总共有255个头像,上述算出来拼好后只用了250个头像,这样计算的方式不是很精确。
图片效果:
将微信朋友头像拼成特定形状
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.