推荐:
自律才能自由
一行代码制作国旗微信图像,附小程序源码!
一到国旗、中秋、十一微信国旗图像的搜索指数就急剧上升。不少人利用这个红旗微信图像赚了不少 money。
今天我教大家(程序员),使用一行代码,就搞定国旗微信图像的制作。
第一步,你要安装 python 环境。
接着第二步,你需要安装 poimage 第三方库。
pip install poimage
接着第三步,使用下面的代码,已经生成你的国旗头像。
# pip install poimage
import poimage
poimage.flag2profile( flag_path=r'D://国旗的图片.png',
profile_path=r'D://程序员业余草的头像.jpg',
output_path=r'D://out/国旗头像.png')
相关参数说明:
效果如下:
国旗微信头像
当然,如果你不会代码,也没事。微信中有很多小程序已经有类似的功能,你直接搜索就可以了。
下面,我推荐一款微信小程序,专门制作微信图像的。
微信图像制作小程序
核心代码超级简单。
{
"pages":[
"pages/splash/splash",
"pages/guoqing/guoqing",
"pages/chrismas/chrismas",
"pages/me/me",
"pages/me/picturehistory/picturehistory",
"pages/me/about/about"
],
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "头像制作",
"navigationBarTextStyle":"black"
},
"tabBar": {
"color": "#515151",
"selectedColor": "#d81e06",
"list": [
{
"pagePath": "pages/guoqing/guoqing",
"text": "国庆头像",
"iconPath": "images/guoqing_normal.png",
"selectedIconPath": "images/guoqing_press.png"
},
{
"pagePath": "pages/chrismas/chrismas",
"text": "圣诞头像",
"iconPath": "images/chrismas_normal.png",
"selectedIconPath": "images/chrismas_press.png"
},
{
"pagePath": "pages/me/me",
"text": "个人中心",
"iconPath": "images/chrismas_normal.png",
"selectedIconPath": "images/chrismas_press.png"
}
]
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}
<!--<ad unit-id="adunit-3229c0c5bf5f7101" ad-intervals="30" bindload="adLoad" binderror="adError" bindclose="adClose">-->
<view style="margin-top:60px;margin-bottom:40px">
<image src="../../images/20190906-logo2.png" height="50px" class="header">
<view class="hot-biz" style="width: 90%;border-radius: 10px;margin-bottom:15px;">
<view class="hot-top">
<view class="tx">
热门
<view class="hot-item-list">
<view class="hot-biz-list" >
<view class="item" wx:for="{{list}}" wx:key="id">
<image bindtap='selectImg' data-id='{{item}}' data-src='../../images/hat{{item}}.png' src="../../images/hat{{item}}.png" mode='aspectFill'>
<view class="canvas-view">
<view style="width:150px;margin-left:20px;border: 2px solid #ffffff;">
<canvas canvas-id="shareImg" style="width:150px;">
<view class='canvas-view-right'>
<button bindtap="getUserProfile" class="btn1">获取头像
<button bindtap="save" class="btn1" disabled="{{!hasUserInfo}}">保存头像
<button open-type="share" bindtap='handleShare' class="btn1">分享好友
加上各种图片一起,也才 5M 左右。细节上,我就不过多解释了微信小程序button图片,我分享一个链接微信小程序button图片,大家自行获取源码:链接: 提取码: 8z8b 。
注册会员查看全部内容……
限时特惠本站每日持续更新海量各大内部创业教程,年会员只要98元,全站资源免费下载
点击查看详情
站长微信:9200327
声明:本站为非盈利性赞助网站,本站所有软件来自互联网,版权属原著所有,如有需要请购买正版。如有侵权,敬请来信联系我们,我们立即删除。