Pillow: Release Pillow 4.3.0 on October 1, 2017

Created on 9 Aug 2017  ·  22Comments  ·  Source: python-pillow/Pillow

Release

Most helpful comment

Ok, they're uploaded. Thanks for the binaries @cgohlke.

All 22 comments

In this release I'm going to work on performance of most common operations. While Pillow-SIMD is the fastest library for image convolutional resize on CPU, there is still a room for optimizations without using SIMD.

  • [x] #2655 Fast image allocation affects almost every operation. Most of them do not require expensive computations and limited only by memory bandwidth, especially with multithreading
  • [x] #2661 New Image.getchannel() method returns single band from image, which is common operation, especially for alpha channel
  • [x] #1989 Using RGBX rawmode for JPEG image loading and saving eliminates unnecessary color conversion for most common image format
  • [x] #2676 #2677 Methods image.split() and Image.merge() use several calls of low-level functions im.getband() and im.putband() which is not effective enough. We need specific low-level functions for this operations which will be 2-2.5 times faster
  • [x] #2679 All filters from ImageFilter.py module are single channel. They are applied to multichannel images by splitting original image to bands, applying filter to each band and merging bands again. Applying filters in one pass should be much more effective. This also unlocks SIMD optimizations
  • [x] #2693 Many functions in Pack.c and Unpack.c operate byte-by-byte (for example ImagingUnpackRGB). This should be more effective to read 4 bytes at once, apply transformation and write back 4 bytes. The same should be much much more effective using 128-bit SIMD registers

I also worried about VIPS benchmarks. Pillow doesn't show good result, because ≈70% of execution time is spending in filter applying (which is one of the most ineffective operation in Pillow). Funny thing is according to my tests Pillow is already faster than Python VIPS in concurrent mode on 4-cores, even with such ineffective filters. My aim to next release is to make Pillow-SIMD on single core as fast as Python VIPS on all 6 cores of Xeon E5-1650 :-> I also want to add VIPS benchmarks to pillow-perf despite the fact that Python VIPS is very hard to install.

Sounds good to me. I'm still mostly away from the keyboard for a few more days, but I'm hoping to have a chance to go through these prs within a week or so.

Feel free to merge pr's that look non controversial and have the required tests / docs.

Some notes about this release.

  • I'm likely out for the weekend of the 30/1, so I'm thinking of a release on the 2nd. I'd like to get to a stable freeze before the weekend.

  • There are a few PRs in the queue that need some love. Either having tests written for them, or they need a feature. (Gif disposal needs a per-frame interface. The I;16 tiff one needs review and testing)

  • I'm beginning to not be a fan of the resolve conflict merges in the github UI. They make massive diffs that mess up clean rebases. I've had to cherry pick a couple of PRs to get around them.

  • [x] release notes for #2699

Things nice to have:

  • [x] #2738 Block & array hybrid storage
  • [ ] Autorotate for JPEG and TIFF images based on EXIF. (Very likely, especially with #2730)
  • [x] #2735 Deprecate undocumented functions in the end of ImageOps module in favor of ImageFilter (also likely)
  • [ ] Check changed core functions and possible other for the GIL releasing
  • [ ] Check is it still possible to finish #1122

Thanks @homm for creating this ticket. 👍 (Time for quarterly ritual of toggling Not Watching to Watching.)

screenshot 2017-09-27 11 49 27

Thank you @wiredfool for your work on #2769, i didn't find the time to finish it so i'm glad someone was here for that.

@jbltx You're welcome.

@python-pillow/pillow-team Should we move this release to Oct 2 or 3?

  • [x] release notes for #2769

For anyone just reading this thread, #2772 has been resolved.

I think we're pretty nearly done here.

  • Either #2778 or #2775 is going to go in, and that's the end of the code changes.
  • There are still some docs that I want to work on, but that can happen after the check run for linux/osx wheels.
  • I'm going to push #1122 and #2761 back, hopefully merge #2761 in the next week or so, and then untangle #1122 into that as well.

I've tagged release 4.3.0: https://github.com/python-pillow/Pillow/tree/4.3.0

Linux wheels are done, one OSX build to go.

Windows binaries are at http://www.lfd.uci.edu/~gohlke/ ...

@cgohlke What is the delay to get this from pip ?

I'm going to upload them shortly

Ok, they're uploaded. Thanks for the binaries @cgohlke.

Thanks all!

RGB to PALETTE conversion
I'm trying to convert RGB image to PALETTE image with PIL:

img = Image.open(tiffile) 
img = img1convert("P", palette=Image.ADAPTIVE, colors=256) 
img.save(newtiffile+"_index.tif")     
img.close()

...but, for example, the white color is 245, not 255 :(
And from CMYK to PALETTE? Is it possible?
PIL version: 5.0.0
Thanks

@paulopires16 Please don't hijack old unrelated threads.

Since it's a palette image, there's no guarantee that any specific color will appear, or where the colors appear in the palette.

Was this page helpful?
0 / 5 - 0 ratings