python-pillow / python-pillow/Pillow

ImageEnhance is not working on 16 bit images

Open
#7,397 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What did you do?

Simply wanted to increase contrast

What did you expect to happen?

contrast would increase

What actually happened?

it thrown an error saying image has wrong mode

What are your OS, Python and Pillow versions?
  • OS: windows 11
  • Python: 3.9
  • Pillow: 10.0.0
from PIL import ImageEnhance

im =Image.open('img/13291_20_30_08-22-2023-10-50-05.tif')
print(im.info)
enh = ImageEnhance.Contrast(im)
enh.enhance(1.3).show("30% more contrast")

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

Start by running the provided Python snippet and inspect the ImageEnhance.Contrast entry point with a 16-bit TIFF. Confirm the failure mode and compare it with supported image modes; done means contrast enhancement works for the reported 16-bit input and a regression test covers it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.