github/Show me the code (0)
https://github.com/Show-Me-the-Code/show-me-the-code
第 0000 題:將你的 QQ 頭像(或者微博頭像)右上角加上紅色的數字,類似於微信未讀資訊數量那種提示效果。類似於圖中效果
from PIL import Image, ImageDraw, ImageFont
def add_num(pic_path, num):
img = Image.open(pic_path)
x, y = img.size
font = ImageFont.truetype("/usr/share/fonts/truetype/./ubuntu-font-family/Ubuntu-R.ttf", x/4)
ImageDraw.Draw(img).text((3*x/4, 0), str(num), font=font, fill='red')
img.save('icon_with_num.jpg')
if name == "main":
add_num("icon.jpg", 5)
相關文章
- Show me the code,babel 7 最佳實踐!Babel
- 【show me the code】Python練習題&語法筆記 2Python筆記
- Show Me the Code!然後把Pepper機器人抱回家機器人
- 演算法工程師-廈門軟二-純粹的研發團隊氛圍~talk is cheap,show me the code!!演算法工程師
- Github Colilot VS Code設定Github
- Visual Studio Code 和 GitHub CopilotGithub
- 在 Github Action 管道內整合 Code Coverage ReportGithub
- Process finished with exit code -1073740791 (0xC0000409)
- github1s: 1秒極速用 VS Code 閱讀 GitHub 原始碼Github原始碼
- QT during startup program with code 0xc0000135(139)QT
- READ ME
- about me
- JavaScript show()JavaScript
- show profiles
- Flutter 如何建立併發布 Plugin (VS Code + GitHub 釋出)FlutterPluginGithub
- Git和Github的最佳VS Code外掛擴充套件Github套件
- recently----me
- IDEA報錯Process finished with exit code -1073741819 (0xC0000005)Idea
- git show 命令Git
- JavaScript show() 方法JavaScript
- A Person Who Is Important to MeImport
- ME 588, Dynamics and Vibration
- Hive throws: WstxParsingException: Illegal character entity: expansion character (code 0x8)HiveException
- QT DirectShowPlayerService::doSetUrlSource: Unresolved error code 0x800c000d ()QTError
- show_space(轉)
- git show命令用法Git
- WPF ProgressBar show value
- 從0到1搭建自己的元件(vue-code-view)庫(下)元件VueView
- 從0到1搭建自己的元件(vue-code-view)庫(上)元件VueView
- 在vs code透過git提交檔案至遠端倉庫(github)Github
- MySQL 之 show processlist 神器MySql
- showModal()與show() 區別
- how to show hidden parameter(zt)
- 園子周邊第3季—設計初稿預覽:2024夏天穿上部落格園T恤 show your code
- Linux Socket C語言網路程式設計:Pthread Socket [code from GitHub, for study]LinuxC語言程式設計threadGithub
- Linux Socket C語言網路程式設計:Poll Socket [code from GitHub, for study]LinuxC語言程式設計Github
- Linux Socket C語言網路程式設計:Epoll Socket [code from GitHub, for study]LinuxC語言程式設計Github
- Tell Me About Yourself Example 1
- rember me all time good luckREMGo