用 pillow 画目标检测的框,支持中文(自带字体)
Project description
用 pillow 画目标检测的框,支持中文(自带字体)
用法见
#!/usr/bin/env python
from imgbox import imgbox
from PIL import Image
from os.path import abspath, dirname, join
DIR = dirname(abspath(__file__))
img = join(DIR, 'test.webp')
img = Image.open(img)
imgbox(img, ('测试', (30, 30, 60, 60)))
img.save(join(DIR, 'box.webp'), quality=80)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
imgbox-0.3.tar.gz
(5.6 MB
view hashes)