Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Pillow 4.3.0 on October 1, 2017 #2664

Closed
homm opened this issue Aug 9, 2017 · 22 comments
Closed

Release Pillow 4.3.0 on October 1, 2017 #2664

homm opened this issue Aug 9, 2017 · 22 comments
Labels
Milestone

Comments

@homm
Copy link
Member

homm commented Aug 9, 2017

No description provided.

@homm homm added the Release label Aug 9, 2017
@homm homm added this to the 4.3.0 milestone Aug 9, 2017
@homm
Copy link
Member Author

homm commented Aug 11, 2017

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.

  • Fast image allocation #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
  • New Image.getchannel method #2661 New Image.getchannel() method returns single band from image, which is common operation, especially for alpha channel
  • Use RGBX rawmode for RGB JPEG images #1989 Using RGBX rawmode for JPEG image loading and saving eliminates unnecessary color conversion for most common image format
  • Fast split() #2676 Fast merge() #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
  • Fast filters #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
  • Fast unpacking and partially packing #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.

@wiredfool
Copy link
Member

wiredfool commented Aug 11, 2017

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.

@wiredfool
Copy link
Member

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.

@wiredfool
Copy link
Member

wiredfool commented Sep 9, 2017

@homm
Copy link
Member Author

homm commented Sep 11, 2017

Things nice to have:

@aclark4life
Copy link
Member

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

screenshot 2017-09-27 11 49 27

@jbltx
Copy link
Contributor

jbltx commented Sep 30, 2017

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.

@wiredfool
Copy link
Member

@jbltx You're welcome.

@aclark4life
Copy link
Member

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

@cgohlke
Copy link
Contributor

cgohlke commented Oct 2, 2017

I think #2772 is a release blocker.

@wiredfool
Copy link
Member

wiredfool commented Oct 2, 2017

@radarhere
Copy link
Member

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

@wiredfool
Copy link
Member

I think we're pretty nearly done here.

@wiredfool
Copy link
Member

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.

@cgohlke
Copy link
Contributor

cgohlke commented Oct 2, 2017

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

@jbltx
Copy link
Contributor

jbltx commented Oct 2, 2017

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

@wiredfool
Copy link
Member

I'm going to upload them shortly

@wiredfool
Copy link
Member

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

@aclark4life
Copy link
Member

Thanks all!

@hugovk
Copy link
Member

hugovk commented Oct 3, 2017

@paulopires16
Copy link

paulopires16 commented Jan 25, 2018

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

@wiredfool
Copy link
Member

@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.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants