blob: 9bad29241522e231a46ab37f3d33aa246748ccc0 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#!/bin/sh
2
3[ "$1" = "python3-pillow" ] || exit 0
4
5python3 - << EOF
6import sys
7from PIL import Image, ImageDraw
8
9if (Image.__version__ != "$2"):
10 print("Wrong version: " + Image.__version__)
11 sys.exit(1)
12
13from PIL import Image, ImageDraw
14img = Image.new('RGB', (100, 30), color = (73, 109, 137))
15d = ImageDraw.Draw(img)
16d.text((10,10), "Hello World", fill=(255,255,0))
17
18# Getting here means we did not get exceptions
19sys.exit(0)
20EOF