Skip to main content
Deno 2 is finally here 🎉️
Learn more

Python Pillow for Deno

Image processing capabilities, resize, rotate, watermarks & filters.

Full documentation and examples coming soon!

Install

Download and install the latest version of Python https://www.python.org/downloads/. Next, install argparse and pillow

pip install argparse pillow

Use

import { pillow } from 'https://raw.githubusercontent.com/michailVestnik/python_pillow/main/mod.ts'

const image = './example.jpg'

await pillow.resize(image, 400)
await pillow.rotate(image, 180)

Permissions

In the permissions, you must specify the version of Python that you are using. It must be python, python3 or python3.9.

deno run --allow-read --allow-write --allow-net --allow-run=python app.js