skillfed

aggdraw

High quality drawing interface for PIL.

aggdraw v1.4.1 187.4K downloads/30d#9,967 on PyPI107
Permissive license Python (MIT style) Active released

What it is and what it does

aggdraw is a Python extension that wraps the Anti-Grain Geometry (AGG) library to provide high-quality 2D drawing. It implements the WCK 2D drawing interface, enabling anti-aliased and alpha-composited graphics rendering. The package bundles AGG sources and compiles them as a C++ extension, so installation requires a C++ compiler on most platforms, though pre-built wheels are available for common Python versions and architectures.

The library is designed for developers who need superior drawing quality—particularly for anti-aliased lines, shapes, and compositing operations. It maintains compatibility with standard image workflows, making it suitable for graphics-intensive applications. The project is actively maintained and supports modern Python versions (3.11+), with experimental free-threading support available.

Use it for:

  • Render anti-aliased vector graphics and shapes for scientific visualization or data plots.
  • Create high-quality composite graphics with alpha blending for image processing pipelines.
  • Draw text and glyphs with TrueType font support (when freetype2 is available) for label and annotation tasks.
  • Build custom image generation tools that require superior rendering quality.
  • Implement 2D graphics in geospatial or remote-sensing applications (package is maintained by pytroll community).

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

aggdraw provides high-quality 2D drawing for images using the Anti-Grain Geometry library, with anti-aliasing and alpha compositing support.

Yes, if you need anti-aliased 2D drawing and have a C++ compiler available. Pre-built wheels eliminate compilation friction on most platforms. Active maintenance, no known vulnerabilities, and permissive licensing make it a safe choice. Not necessary if basic drawing suffices or if you cannot compile C extensions.

Install

aggdraw on PyPI

pip

pip install aggdraw

uv

uv add aggdraw

poetry

poetry add aggdraw

Installing aggdraw

Before you install

Medium install friction due to C++ compilation requirement. Pre-built wheels are available for Python 3.11–3.14 across macOS, Linux, and Windows architectures, reducing build burden on most platforms. Active maintenance with recent releases.

License in practice

Licensed under a permissive MIT-style license. No restrictions on commercial or proprietary use; you may modify and distribute freely provided copyright notices are retained.

Quickstart

pip install aggdraw

import aggdraw

draw = aggdraw.Draw(image)
draw.line((x1, y1, x2, y2), fill_color)
image.save('output.png')

Requires a C++ compiler and Python ≥3.11. Optional: freetype2 library for TrueType/OpenType font support (requires freetype-config on PATH during build).

Verify before relying

  • Whether free-threading support (mentioned in description) is production-ready or still experimental given the 'Unstable' classifier.
  • Current state of freetype2 integration and whether it is commonly needed for typical use cases.
  • Specific image format compatibility and whether aggdraw works with formats beyond those supported by the underlying image library.

Package facts

License Python (MIT style) (permissive)
Python support supports the current Python release (>=3.11)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 254 days since the last release
Last repo commit
First released
Downloads 187,383/month — #9,967 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aggdraw-1.4.1-cp311-cp311-macosx_14_0_arm64.whl; aggdraw-1.4.1-cp311-cp311-macosx_14_0_x86_64.whl; aggdraw-1.4.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; aggdraw-1.4.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; aggdraw-1.4.1-cp311-cp311-win_amd64.whl; aggdraw-1.4.1-cp311-cp311-win_arm64.whl; aggdraw-1.4.1-cp312-cp312-macosx_14_0_arm64.whl; aggdraw-1.4.1-cp312-cp312-macosx_14_0_x86_64.whl; aggdraw-1.4.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; aggdraw-1.4.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; aggdraw-1.4.1-cp312-cp312-win_amd64.whl; aggdraw-1.4.1-cp312-cp312-win_arm64.whl; aggdraw-1.4.1-cp313-cp313-macosx_14_0_arm64.whl; aggdraw-1.4.1-cp313-cp313-macosx_14_0_x86_64.whl; aggdraw-1.4.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl; aggdraw-1.4.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl; aggdraw-1.4.1-cp313-cp313-win_amd64.whl; aggdraw-1.4.1-cp313-cp313-win_arm64.whl; aggdraw-1.4.1-cp314-cp314-macosx_14_0_arm64.whl; aggdraw-1.4.1-cp314-cp314-macosx_14_0_x86_64.whl

Development Status :: 4 - BetaProgramming Language :: Python :: Free Threading :: 1 - UnstableTopic :: Multimedia :: Graphics

Tags

image drawing anti-aliasing2D graphics rendering Pythonhigh-quality image drawinganti-grain geometry libraryalpha compositing graphicsWCK drawing interfacevector graphics rendering
image-renderingvector-graphicsagg-library

More Graphics packages