Pillow
Pillow copied to clipboard
Python Imaging Library (Fork)
Here is a 16-bit grayscale image:  It clearly contains a gradient of grays. If I open it with Pillow, convert it to 8-bit grayscale, and save it, like so......
Whenever a function needs to extrapolate values of non-existing pixels (i.e. pixels outside of the image), it should be possible to specify the extrapolation method to use. The extrapolation methods...
### What did you do? ```python from PIL import Image Image.MAX_IMAGE_PIXELS = 1
### What did you do? This image, named `test-in.png`, has 508 distinct colors according to `getcolors()`.  I tried to quantize it to 256 colors with the following code. ```python...
For finding duplicates, it would be nice if Pillow would include some perceptual hashing algorithm: https://en.wikipedia.org/wiki/Perceptual_hashing The real use case for me is that my in my photo collection I...
I learned this from doc: > xy – Four points to define the bounding box. Sequence of either [(x0, y0), (x1, y1)] or [x0, y0, x1, y1]. The second point...
This is a feature request. Would it be within the scope of pillow to have a function that identifies dominant colors within an image? The [relevant question](https://stackoverflow.com/questions/3241929/python-find-dominant-most-common-color-in-an-image#3244061) on StackOverflow has...
### What did you do? ```python import numpy as np from PIL import Image import cv2 def pil_linear(im, shape_wh): im = Image.fromarray(im.astype("float32"), mode="F") return np.array(im.resize(shape_wh, Image.BILINEAR)) def cv_linear(im, shape_wh): return...
### What did you do? python-3.6 with Pillow-5.2.0  Download this image as leaf-gr.jpg then start python and do ```python from PIL import Image, ImageOps im = Image.open('leaf-gr.jpg') ImageOps.autocontrast(im, cutoff=2).show()...
### What did you do? Load the image linked below, convert it to float and resize it with LANCZOS. ### What did you expect to happen? An image with positive...