python制作抖音代码舞
作者:liu振华 时间:2021-09-05 21:51:00
本文实例为大家分享了抖音代码舞python制作代码,供大家参考,具体内容如下
一、效果图
二、转换代码
from img import Image
ascil_char = list("$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\|()1{}[]?-_+~<>i!lI;:,\"^`'. ")
table = ('#8XOHLTI)i=+;:,. ') # 对于灰度图像效果不错
img = image.open("img\zyh.jpg")
if img.mode != "L": # 如果不是灰度图像,转换为灰度图像
im = img.convert("L")
a = img.size[0]
b = img.size[1]
img = img.resize((100, 90)) # 转换图像大小,这个大小是我随意设置的
f = open("img.txt", 'w+') # 目标文本文件
for i in range(1, b, 2):
line = ('')
for j in range(a):
line += table[int((float(im.getpixel((j, i))) / 256.0) * len(table))]
line += ("\n")
f.write(line)
f.close()
第二转换法:
1.下载软件:Ascgen
2.Ascgen操作
来源:https://blog.csdn.net/qq_43295136/article/details/83628420
标签:python,抖音,代码舞
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Python学习之MRO方法搜索顺序
2022-01-25 13:08:12
![](https://img.aspxhome.com/file/2023/9/99439_0s.png)
使用python的pandas读取excel文件中的数据详情
2023-06-18 11:26:11
![](https://img.aspxhome.com/file/2023/9/103279_0s.png)
Python利用pynimate实现制作动态排序图
2023-05-25 03:31:32
![](https://img.aspxhome.com/file/2023/4/88994_0s.gif)
如何利用Pyecharts可视化微信好友
2022-04-13 07:34:14
![](https://img.aspxhome.com/file/2023/0/86450_0s.gif)
NumPy进行统计分析
2023-09-21 00:16:15
![](https://img.aspxhome.com/file/2023/7/97007_0s.png)
Go语言框架快速集成限流中间件详解
2023-08-26 11:44:39
python argparse的使用步骤(全网最全)
2023-06-14 01:13:45
![](https://img.aspxhome.com/file/2023/9/59289_0s.png)
pycharm 使用心得(四)显示行号
2023-04-28 09:24:54
![](https://img.aspxhome.com/file/2023/9/101489_0s.jpg)
SQL Server从安装到建库为新手寻找捷径
2009-01-13 13:22:00
Python实现队列的方法
2023-08-29 06:45:30
python网络编程之读取网站根目录实例
2021-03-07 03:04:35
ASP实现网页打开任何类型文件都保存的方法
2007-12-21 13:10:00
设计与表达
2009-07-27 11:45:00
![](https://img.aspxhome.com/file/UploadPic/20097/27/0907_sheji_biaoda_01-84s.jpg)
Python爬虫文件下载图文教程
2023-11-18 23:59:03
![](https://img.aspxhome.com/file/2023/5/86195_0s.png)
详解python statistics模块及函数用法
2021-09-18 00:08:19
python简单猜数游戏实例
2023-10-05 21:31:55
python神经网络Keras GhostNet模型的实现
2022-05-16 17:19:42
![](https://img.aspxhome.com/file/2023/9/93679_0s.png)
如何使用Cython对python代码进行加密
2023-07-21 19:33:40
Python函数中apply、map、applymap的区别
2022-08-11 04:20:36
关于人物角色设计讨论
2008-10-16 13:47:00
![](https://img.aspxhome.com/file/UploadPic/200810/16/20081016134946734s.jpg)