python-pillow / python-pillow/Pillow

Jarvis-judice-ninke dithering

Open
#9,619 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
Python
Stars
13.8k
Forks
2.5k
Avg merge
2d 8h
Merged PRs (30d)
89

Description

Feature request...

I wanted to use jarvis-judice-ninke dither but it is not in Pillow nor seems planned.
jarvis-judice-ninke is a more enhanced variant of floyd-steinberg.

while floyd- steinberg uses:
*7
351

jarvis-judice-ninke uses:
*75
35753
13531

for the diffusion matrix. this does mean it is a little slower. however, Pillow is fast enough that the speed difference may be unnoticed for typical use cases.


--------------------------------------------------------------------
Pillow 12.1.1
Python 3.13.12 (tags/v3.13.12:1cbe481, Feb  3 2026, 18:22:25) [MSC v.1944 64 bit (AMD64)]
--------------------------------------------------------------------
Python executable is C:\Users\Owner\AppData\Local\Python\pythoncore-3.13-64\pythonw.exe
System Python files loaded from C:\Users\Owner\AppData\Local\Python\pythoncore-3.13-64
--------------------------------------------------------------------
Python Pillow modules loaded from C:\Users\Owner\AppData\Local\Python\pythoncore-3.13-64\Lib\site-packages\PIL
Binary Pillow modules loaded from C:\Users\Owner\AppData\Local\Python\pythoncore-3.13-64\Lib\site-packages\PIL
--------------------------------------------------------------------
--- PIL CORE support ok, compiled for 12.1.1
--- TKINTER support ok, loaded 8.6
--- FREETYPE2 support ok, loaded 2.14.1
--- LITTLECMS2 support ok, loaded 2.17
--- WEBP support ok, loaded 1.6.0
--- AVIF support ok, loaded 1.3.0
--- JPEG support ok, compiled for libjpeg-turbo 3.1.3
--- OPENJPEG (JPEG2000) support ok, loaded 2.5.4
--- ZLIB (PNG/ZIP) support ok, loaded 1.3.1.zlib-ng, compiled for zlib-ng 2.3.2
--- LIBTIFF support ok, loaded 4.7.1
*** RAQM (Bidirectional Text) support not installed
*** LIBIMAGEQUANT (Quantization method) support not installed
*** XCB (X protocol) support not installed
--------------------------------------------------------------------

Followup:
I noticed 2 to be implemented dithering options. any timeline for those?
also, hitherdither implements all of it already but is slower than Pillow. it may be a good reference though.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name implementation files or tests. Start by locating Pillow's existing Floyd–Steinberg dithering entry point and compare its behavior with the Jarvis–Judice–Ninke matrix described here; hitherdither is offered as a reference. Done means the requested dithering option is available in Pillow and covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.