0
0
mirror of https://github.com/openwrt/packages.git synced 2025-02-07 09:19:51 +00:00
Alexandru Ardelean 3be6f6bec9 pillow: bump to version 10.1.0
Add test.sh also.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2023-10-20 13:02:49 +02:00

21 lines
438 B
Bash

#!/bin/sh
[ "$1" = "python3-pillow" ] || exit 0
python3 - << EOF
import sys
from PIL import Image, ImageDraw
if (Image.__version__ != "$2"):
print("Wrong version: " + Image.__version__)
sys.exit(1)
from PIL import Image, ImageDraw
img = Image.new('RGB', (100, 30), color = (73, 109, 137))
d = ImageDraw.Draw(img)
d.text((10,10), "Hello World", fill=(255,255,0))
# Getting here means we did not get exceptions
sys.exit(0)
EOF