镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Release Pillow 4.3.0 on October 1, 2017 #2664

Closed

Description

@homm
No description provided.

Activity

  1. added this to the 4.3.0 milestone on Aug 9, 2017
  2. homm commented on Aug 11, 2017

    @homm
    MemberAuthor

    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.

  3. wiredfool commented on Aug 11, 2017

    @wiredfool
    Member

    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.

  4. wiredfool commented on Sep 9, 2017

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

  5. wiredfool commented on Sep 9, 2017

    @wiredfool
    Member
  6. homm commented on Sep 11, 2017

    @homm
    MemberAuthor

    Things nice to have:

  7. aclark4life commented on Sep 27, 2017

    @aclark4life
    Member

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

    screenshot 2017-09-27 11 49 27

  8. jbltx commented on Sep 30, 2017

    @jbltx
    Contributor

    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.

  9. wiredfool commented on Oct 1, 2017

    @wiredfool
    Member

    @jbltx You're welcome.

  10. aclark4life commented on Oct 2, 2017

    @aclark4life
    Member

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

  11. cgohlke commented on Oct 2, 2017

    @cgohlke
    Contributor

    I think #2772 is a release blocker.

  12. wiredfool commented on Oct 2, 2017

    @wiredfool
    Member
  13. radarhere commented on Oct 2, 2017

    @radarhere
    Member

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

  14. wiredfool commented on Oct 2, 2017

    @wiredfool
    Member

    I think we're pretty nearly done here.

  15. wiredfool commented on Oct 2, 2017

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

  16. cgohlke commented on Oct 2, 2017

    @cgohlke
    Contributor

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

  17. jbltx commented on Oct 2, 2017

    @jbltx
    Contributor

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

  18. wiredfool commented on Oct 2, 2017

    @wiredfool
    Member

    I'm going to upload them shortly

  19. wiredfool commented on Oct 2, 2017

    @wiredfool
    Member

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

  20. aclark4life commented on Oct 2, 2017

    @aclark4life
    Member

    Thanks all!

  21. hugovk commented on Oct 3, 2017

    @hugovk
    Member
  22. paulopires16 commented on Jan 25, 2018

    @paulopires16

    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

  23. wiredfool commented on Jan 25, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions