The friendly PIL fork (Python Imaging Library)

Overview

Pillow logo

Pillow

Python Imaging Library (Fork)

Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. As of 2019, Pillow development is supported by Tidelift.

docs Documentation Status
tests GitHub Actions build status (Lint) GitHub Actions build status (Test Linux and macOS) GitHub Actions build status (Test Windows) GitHub Actions build status (Test Docker) AppVeyor CI build status (Windows) GitHub Actions wheels build status (Wheels) Travis CI wheels build status (aarch64) Code coverage
package Zenodo Tidelift Newest PyPI version Number of PyPI downloads
social Join the chat at https://gitter.im/python-pillow/Pillow Follow on https://twitter.com/PythonPillow

Overview

The Python Imaging Library adds image processing capabilities to your Python interpreter.

This library provides extensive file format support, an efficient internal representation, and fairly powerful image processing capabilities.

The core image library is designed for fast access to data stored in a few basic pixel formats. It should provide a solid foundation for a general image processing tool.

More Information

Report a Vulnerability

To report a security vulnerability, please follow the procedure described in the Tidelift security policy.

Comments
  • Unable to install Pillow on the Macbook Pro 13 M1 Silicon

    Unable to install Pillow on the Macbook Pro 13 M1 Silicon

    What did you do?

    I tried installing a pillow with the pipenv, I have a python version 3.9.1 installed and tried to install a pillow with that but facing this issue mentioned below.

    What did you expect to happen?

    I wanted to use pillow with django.

    What actually happened?

    Pillow installation causing error continuously, the error is mentioned below.

    What are your OS, Python, and Pillow versions?

    • OS: macOS Big Sur
    • Python: 3.9.1
    • Pillow: 7.2.0
    Collecting Pillow==7.2.0
      Using cached Pillow-7.2.0.tar.gz (39.1 MB)
    Building wheels for collected packages: Pillow
      Building wheel for Pillow (setup.py) ... error
      ERROR: Command errored out with exit status 1:
       command: /Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py'"'"'; __file__='"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-wheel-rk7rd8w9
           cwd: /private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/
      Complete output (172 lines):
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.14.6-arm64-3.8
      creating build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageMode.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PngImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/XbmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PcxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/SunImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/SpiderImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/TarIO.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/FitsStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/MpegImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/BdfFontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/GribStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageStat.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PixarImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/GimpPaletteFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageColor.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ContainerIO.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/MspImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/MicImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/_version.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImtImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/GifImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PalmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageQt.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageMath.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PaletteFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/FontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PdfParser.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ExifTags.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageCms.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/FpxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageChops.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/BufrStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PSDraw.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PcdImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageFilter.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageDraw2.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImagePath.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/DcxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/__init__.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/JpegPresets.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/features.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageDraw.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/GimpGradientFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageWin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/IcoImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/_tkinter_finder.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/EpsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/TgaImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageMorph.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/WalImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PcfFontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/BlpImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageTk.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/GbrImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageOps.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PdfImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageShow.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageEnhance.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/WmfImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageGrab.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/WebPImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/FliImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/TiffTags.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/CurImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/_util.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/GdImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/TiffImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/IptcImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImagePalette.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/BmpImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageTransform.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/IcnsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/McIdasImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/XpmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/DdsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageSequence.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PyAccess.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/_binary.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/Image.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/__main__.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/XVThumbImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/SgiImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PsdImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/JpegImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/ImageFont.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/PpmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      copying src/PIL/FtexImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
      running egg_info
      writing src/Pillow.egg-info/PKG-INFO
      writing dependency_links to src/Pillow.egg-info/dependency_links.txt
      writing top-level names to src/Pillow.egg-info/top_level.txt
      reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching '*.c'
      warning: no files found matching '*.h'
      warning: no files found matching '*.sh'
      warning: no previously-included files found matching '.appveyor.yml'
      warning: no previously-included files found matching '.coveragerc'
      warning: no previously-included files found matching '.editorconfig'
      warning: no previously-included files found matching '.readthedocs.yml'
      warning: no previously-included files found matching 'codecov.yml'
      warning: no previously-included files matching '.git*' found anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.so' found anywhere in distribution
      no previously-included directories found matching '.ci'
      writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
      warning: build_py: byte-compiling is disabled, skipping.
      
      running build_ext
      
      
      The headers or library files could not be found for zlib,
      a required dependency when compiling Pillow from source.
      
      Please see the install instructions at:
         https://pillow.readthedocs.io/en/latest/installation.html
      
      Traceback (most recent call last):
        File "/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py", line 864, in <module>
          setup(
        File "/Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
          return distutils.core.setup(**attrs)
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run
          self.build_extensions()
        File "/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py", line 694, in build_extensions
          raise RequiredDependencyException(f)
      __main__.RequiredDependencyException: zlib
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py", line 918, in <module>
          raise RequiredDependencyException(msg)
      __main__.RequiredDependencyException:
      
      The headers or library files could not be found for zlib,
      a required dependency when compiling Pillow from source.
      
      Please see the install instructions at:
         https://pillow.readthedocs.io/en/latest/installation.html
      
      
      ----------------------------------------
      ERROR: Failed building wheel for Pillow
      Running setup.py clean for Pillow
    Failed to build Pillow
    Installing collected packages: Pillow
        Running setup.py install for Pillow ... error
        ERROR: Command errored out with exit status 1:
         command: /Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py'"'"'; __file__='"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-record-sbw6wf02/install-record.txt --single-version-externally-managed --compile --install-headers /Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/include/site/python3.8/Pillow
             cwd: /private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/
        Complete output (174 lines):
        running install
        running build
        running build_py
        creating build
        creating build/lib.macosx-10.14.6-arm64-3.8
        creating build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/MpoImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageMode.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PngImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/XbmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PcxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/SunImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/SpiderImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/TarIO.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/FitsStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/MpegImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/BdfFontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/GribStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageStat.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PixarImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/GimpPaletteFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageColor.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ContainerIO.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/MspImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/MicImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/_version.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImtImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/GifImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PalmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageQt.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageMath.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PaletteFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/FontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PdfParser.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ExifTags.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageCms.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/FpxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageChops.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/BufrStubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PSDraw.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PcdImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageFilter.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageDraw2.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImagePath.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/DcxImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/__init__.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/JpegPresets.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/features.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageDraw.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/GimpGradientFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageWin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/IcoImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/_tkinter_finder.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/EpsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/TgaImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageMorph.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/WalImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PcfFontFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/BlpImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageTk.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/GbrImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageOps.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PdfImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageShow.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageEnhance.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/WmfImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageGrab.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/WebPImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/FliImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/TiffTags.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/CurImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/_util.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/GdImageFile.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/TiffImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/IptcImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImagePalette.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/BmpImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageTransform.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/IcnsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/McIdasImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/XpmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/DdsImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageSequence.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PyAccess.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/_binary.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/Image.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/__main__.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/XVThumbImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/SgiImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PsdImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/JpegImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/ImageFont.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/PpmImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        copying src/PIL/FtexImagePlugin.py -> build/lib.macosx-10.14.6-arm64-3.8/PIL
        running egg_info
        writing src/Pillow.egg-info/PKG-INFO
        writing dependency_links to src/Pillow.egg-info/dependency_links.txt
        writing top-level names to src/Pillow.egg-info/top_level.txt
        reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
        reading manifest template 'MANIFEST.in'
        warning: no files found matching '*.c'
        warning: no files found matching '*.h'
        warning: no files found matching '*.sh'
        warning: no previously-included files found matching '.appveyor.yml'
        warning: no previously-included files found matching '.coveragerc'
        warning: no previously-included files found matching '.editorconfig'
        warning: no previously-included files found matching '.readthedocs.yml'
        warning: no previously-included files found matching 'codecov.yml'
        warning: no previously-included files matching '.git*' found anywhere in distribution
        warning: no previously-included files matching '*.pyc' found anywhere in distribution
        warning: no previously-included files matching '*.so' found anywhere in distribution
        no previously-included directories found matching '.ci'
        writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
        warning: build_py: byte-compiling is disabled, skipping.
        
        running build_ext
        
        
        The headers or library files could not be found for zlib,
        a required dependency when compiling Pillow from source.
        
        Please see the install instructions at:
           https://pillow.readthedocs.io/en/latest/installation.html
        
        Traceback (most recent call last):
          File "/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py", line 864, in <module>
            setup(
          File "/Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
            return distutils.core.setup(**attrs)
          File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
            dist.run_commands()
          File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
            self.run_command(cmd)
          File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
            cmd_obj.run()
          File "/Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
            return orig.install.run(self)
          File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/install.py", line 561, in run
            self.run_command('build')
          File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
            self.distribution.run_command(command)
          File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
            cmd_obj.run()
          File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build.py", line 135, in run
            self.run_command(cmd_name)
          File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
            self.distribution.run_command(command)
          File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
            cmd_obj.run()
          File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/build_ext.py", line 340, in run
            self.build_extensions()
          File "/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py", line 694, in build_extensions
            raise RequiredDependencyException(f)
        __main__.RequiredDependencyException: zlib
        
        During handling of the above exception, another exception occurred:
        
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py", line 918, in <module>
            raise RequiredDependencyException(msg)
        __main__.RequiredDependencyException:
        
        The headers or library files could not be found for zlib,
        a required dependency when compiling Pillow from source.
        
        Please see the install instructions at:
           https://pillow.readthedocs.io/en/latest/installation.html
        
        
        ----------------------------------------
    ERROR: Command errored out with exit status 1: /Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py'"'"'; __file__='"'"'/private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-install-exv5oeqg/pillow_d26c2175614649e1b0d3d03ff481fca6/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/6z/3hxj8p2s6vlgfynhc4wvxfd00000gn/T/pip-record-sbw6wf02/install-record.txt --single-version-externally-managed --compile --install-headers /Users/harsh/.local/share/virtualenvs/pdist-o77J8eHd/include/site/python3.8/Pillow Check the logs for full command output.
    
    Installation macOS Packaging 
    opened by HarshSonawane 80
  • Segfault on Alpine Linux Docker

    Segfault on Alpine Linux Docker

    What did you do?

    Pillow is embedded into the Odoo library. I was trying to load a data file which referenced a png, when suddenly a segfault terminated my container.

    What did you expect to happen?

    The processing of the png would complete successfully.

    What actually happened?

    Putting on DEBUG mode, we can see the following output.

    odoo    | 2016-05-30 08:29:20,832 7 INFO test openerp.modules.loading: loading base/base_data.xml
    odoo    | 2016-05-30 08:29:21,050 7 DEBUG test PIL.PngImagePlugin: STREAM IHDR 16 13
    odoo    | 2016-05-30 08:29:21,052 7 DEBUG test PIL.PngImagePlugin: STREAM bKGD 41 6
    odoo    | 2016-05-30 08:29:21,052 7 DEBUG test PIL.PngImagePlugin: bKGD 41 6 (unknown)
    odoo    | 2016-05-30 08:29:21,053 7 DEBUG test PIL.PngImagePlugin: STREAM pHYs 59 9
    odoo    | 2016-05-30 08:29:21,053 7 DEBUG test PIL.PngImagePlugin: STREAM tIME 80 7
    odoo    | 2016-05-30 08:29:21,054 7 DEBUG test PIL.PngImagePlugin: tIME 80 7 (unknown)
    odoo    | 2016-05-30 08:29:21,054 7 DEBUG test PIL.PngImagePlugin: STREAM IDAT 99 7809
    odoo    | 2016-05-30 08:29:21,087 7 DEBUG test PIL.PngImagePlugin: STREAM IHDR 16 13
    odoo    | 2016-05-30 08:29:21,088 7 DEBUG test PIL.PngImagePlugin: STREAM bKGD 41 6
    odoo    | 2016-05-30 08:29:21,088 7 DEBUG test PIL.PngImagePlugin: bKGD 41 6 (unknown)
    odoo    | 2016-05-30 08:29:21,088 7 DEBUG test PIL.PngImagePlugin: STREAM pHYs 59 9
    odoo    | 2016-05-30 08:29:21,093 7 DEBUG test PIL.PngImagePlugin: STREAM tIME 80 7
    odoo    | 2016-05-30 08:29:21,094 7 DEBUG test PIL.PngImagePlugin: tIME 80 7 (unknown)
    odoo    | 2016-05-30 08:29:21,094 7 DEBUG test PIL.PngImagePlugin: STREAM IDAT 99 7809
    odoo    | 2016-05-30 08:29:21,275 7 DEBUG test PIL.PngImagePlugin: STREAM IHDR 16 13
    odoo    | 2016-05-30 08:29:21,276 7 DEBUG test PIL.PngImagePlugin: STREAM bKGD 41 6
    odoo    | 2016-05-30 08:29:21,276 7 DEBUG test PIL.PngImagePlugin: bKGD 41 6 (unknown)
    odoo    | 2016-05-30 08:29:21,276 7 DEBUG test PIL.PngImagePlugin: STREAM pHYs 59 9
    odoo    | 2016-05-30 08:29:21,277 7 DEBUG test PIL.PngImagePlugin: STREAM tIME 80 7
    odoo    | 2016-05-30 08:29:21,277 7 DEBUG test PIL.PngImagePlugin: tIME 80 7 (unknown)
    odoo    | 2016-05-30 08:29:21,278 7 DEBUG test PIL.PngImagePlugin: STREAM IDAT 99 7809
    odoo    | 2016-05-30 08:29:21,338 7 DEBUG test PIL.PngImagePlugin: STREAM IHDR 16 13
    odoo    | 2016-05-30 08:29:21,338 7 DEBUG test PIL.PngImagePlugin: STREAM bKGD 41 6
    odoo    | 2016-05-30 08:29:21,339 7 DEBUG test PIL.PngImagePlugin: bKGD 41 6 (unknown)
    odoo    | 2016-05-30 08:29:21,339 7 DEBUG test PIL.PngImagePlugin: STREAM pHYs 59 9
    odoo    | 2016-05-30 08:29:21,339 7 DEBUG test PIL.PngImagePlugin: STREAM tIME 80 7
    odoo    | 2016-05-30 08:29:21,340 7 DEBUG test PIL.PngImagePlugin: tIME 80 7 (unknown)
    odoo    | 2016-05-30 08:29:21,340 7 DEBUG test PIL.PngImagePlugin: STREAM IDAT 99 7809
    odoo    | 2016-05-30 08:29:21,384 7 DEBUG test PIL.PngImagePlugin: STREAM IHDR 16 13
    odoo    | 2016-05-30 08:29:21,385 7 DEBUG test PIL.PngImagePlugin: STREAM bKGD 41 6
    odoo    | 2016-05-30 08:29:21,385 7 DEBUG test PIL.PngImagePlugin: bKGD 41 6 (unknown)
    odoo    | 2016-05-30 08:29:21,385 7 DEBUG test PIL.PngImagePlugin: STREAM pHYs 59 9
    odoo    | 2016-05-30 08:29:21,386 7 DEBUG test PIL.PngImagePlugin: STREAM tIME 80 7
    odoo    | 2016-05-30 08:29:21,386 7 DEBUG test PIL.PngImagePlugin: tIME 80 7 (unknown)
    odoo    | 2016-05-30 08:29:21,386 7 DEBUG test PIL.PngImagePlugin: STREAM IDAT 99 7809
    odoo    | 2016-05-30 08:29:21,563 7 DEBUG test PIL.PngImagePlugin: STREAM IHDR 16 13
    odoo    | 2016-05-30 08:29:21,563 7 DEBUG test PIL.PngImagePlugin: STREAM bKGD 41 6
    odoo    | 2016-05-30 08:29:21,564 7 DEBUG test PIL.PngImagePlugin: bKGD 41 6 (unknown)
    odoo    | 2016-05-30 08:29:21,564 7 DEBUG test PIL.PngImagePlugin: STREAM pHYs 59 9
    odoo    | 2016-05-30 08:29:21,564 7 DEBUG test PIL.PngImagePlugin: STREAM tIME 80 7
    odoo    | 2016-05-30 08:29:21,564 7 DEBUG test PIL.PngImagePlugin: tIME 80 7 (unknown)
    odoo    | 2016-05-30 08:29:21,565 7 DEBUG test PIL.PngImagePlugin: STREAM IDAT 99 7809
    odoo    | Segmentation fault
    

    What versions of Pillow and Python are you using?

    Pillow 3.2.0 and (probably through) 2.7.0 Python 2.7.11 Alpine Linux 3.3

    opened by blaggacao 71
  • Automatic scaling of Image.MAXBLOCK

    Automatic scaling of Image.MAXBLOCK

    There's a venerable old PIL bug which caused Image.save(optimize=True) to fail with JPEGs when the file size is over a certain threshold. The earliest reference I could find dates back to 1999:

    http://mail.python.org/pipermail/image-sig/1999-December/000942.html

    The workaround commonly used is to either hardcode something like this:

    ImageFile.MAXBLOCK = <empirically determined constant (i.e. wild guess)>
    

    or the more dynamic approach used in e.g. jdriscoll/django-imagekit#50:

    ImageFile.MAXBLOCK = max(img.size) ** 2
    

    This seems like exactly the kind of thing Pillow could just fix once and for all.

    Bug Hasn't worked in 20 years Memory 
    opened by acdha 61
  • Any interest in automated builds for OSX wheels?

    Any interest in automated builds for OSX wheels?

    I posted this to the image-sig mailing list but can't see any evidence it got there. Sorry if this is a duplicate.

    I spent some time making a travis-ci repository that will create an OSX wheel from a Pillow release (the current 2.4.0 release):

    https://github.com/matthew-brett/pillow-wheels

    When I push commits or trigger a build on this repo, for Python 2.7, 3.3, 3.4 it:

    • builds the dependent libraries
    • builds Pillow
    • copies the needed external libraries into the Pillow distribution
    • makes an OSX wheel
    • installs the wheel into a Python virtualenv
    • runs the unit tests
    • uploads the wheel to a rackspace container

    http://a365fff413fe338398b6-1c8a9b3114517dc5fe17b7c3f8c63a43.r19.cf2.rackcdn.com/

    Example build etc log here:

    https://travis-ci.org/matthew-brett/pillow-wheels

    In particular, here's the tests passing on one of the three builds:

    https://travis-ci.org/matthew-brett/pillow-wheels/jobs/28768481#L6645

    Would y'all be interested to take this over at the python-Pillow organization? I can set you up with the rackspace upload credentials for the repo if you are interested.

    Enhancement 
    opened by matthew-brett 56
  • Pillow stickers & domain

    Pillow stickers & domain

    Attention world and @python-pillow/pillow-team,

    I have long longed for Pillow stickers, and thanks to the generosity of Tidelift and logistical assistance from @brennaheaps, looks like 2020 will be the year we finally get them. Roughly, my vision is 500 of the following design purchased from StickerMule and 100 shipped to each of the 5 core developers (@homm included, though he recently stepped away from Tidelift payroll):

    pillow-logo

    The deadline for submitting the order will be arbitrarily set to coincide with the next Pillow release, with delivery in the hands of core developers no later than mid-year (at which point they can distribute them at local events, PyCon, etc.)

    To accomplish this, we'll need:

    • High resolution design
    • Current address of each core developer (if different than address on file with Tidelift)
    • Drone delivery for @wiredfool who is currently somewhere in Europe, address at time of sticker delivery TBD 😄
    • Whatever else @brennaheaps says we need to make this happen
    • Ideas from @python-pillow/pillow-team about how the process and end result should be, assuming not everyone will picture the same thing I do.

    Thanks all!! Looking forward delivering awesome Pillow stickers to core developers and subsequently the world.

    opened by aclark4life 55
  • Problem with saving image from clipboard

    Problem with saving image from clipboard

    Hello,

    I have Windows 8 x64 system and installed Pillow version 2.8.2 I'm trying to grab image from clipboard. I press "Alt+PrtSc" and then call grabclipboard function, and get such error:

    ImageGrab.grabclipboard()
    ---------------------------------------------------------------------------
    IOError                                   Traceback (most recent call last)
    <ipython-input-2-c8274e888e6c> in <module>()
          1 from PIL import ImageGrab
          2 
    ----> 3 ImageGrab.grabclipboard()
    
    C:\Anaconda\lib\site-packages\PIL\ImageGrab.pyc in grabclipboard()
         49         from PIL import BmpImagePlugin
         50         import io
    ---> 51         return BmpImagePlugin.DibImageFile(io.BytesIO(data))
         52     return data
    
    C:\Anaconda\lib\site-packages\PIL\ImageFile.pyc in __init__(self, fp, filename)
         95 
         96         try:
    ---> 97             self._open()
         98         except IndexError as v:  # end of data
         99             if Image.DEBUG > 1:
    
    C:\Anaconda\lib\site-packages\PIL\BmpImagePlugin.pyc in _open(self)
        204 
        205     def _open(self):
    --> 206         self._bitmap()
        207 
        208 #
    
    C:\Anaconda\lib\site-packages\PIL\BmpImagePlugin.pyc in _bitmap(self, header, offset)
        145                     raw_mode = MASK_MODES[(file_info['bits'], file_info['rgb_mask'])]
        146                 else:
    --> 147                     raise IOError("Unsupported BMP bitfields layout")
        148             else:
        149                 raise IOError("Unsupported BMP bitfields layout")
    
    IOError: Unsupported BMP bitfields layout
    

    But if I call ImageGrab.grab function, screenshot(of whole screen) is saved properly.

    Bug Windows 
    opened by sallyruthstruik 52
  • Displaying retrieved image from database on QFormLayout

    Displaying retrieved image from database on QFormLayout

    Hello,

    I am finding it difficult to display retrieved photo varbinary data as a photo (an image). I have a qtablewidget where the retrieved data are stored. The varbinary data gets displayed there. I am coding in Python, managing my database with Microsoft SQL, pyodbc

    I have a qformLayout below it where I append the data of the qTablewidget to. Now in the qformlayout, I want the photo to display, not the varbinary text. How do I go about it?

    NOTE: I successfully retrieved my all the records and append them in their respective form cell when highlighted, my challenge is displaying the retrieved varbinary data as an image, not byte.

    Here are some of the codes I have tried:

     itemList.append(self.passlb)
       
    
          for row in rows:
     for col in range(self.tab.columnCount()):
        itemArray = self.tab.item(row, col)
        text = "" if itemArray is None else itemArray.text()
    
         if (col == 14):
            itemList[12].open('rb')
    
    
    
            streamm = BytesIO(self.passlbbtx.text().encode())
            img = Image.open(streamm).convert("RGBA")
            print(img)
            streamm.close()
    

    passlb = the passport photograph label i.e QLabel("Passport photo") in my database table, the passport is in column 14, in my qformlayout, the passport is appended in row 12

    opened by CXX22 51
  • OSError: -2 when decoding a tiff_lzw file

    OSError: -2 when decoding a tiff_lzw file

    This is with pillow 6.2.1 on

    Python 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 22:01:29) [MSC v.1900 64 bit (AMD64)]

    Seems libtiff is found without a problem, but decoding fails:

    In [5]: dat = img.getdata()
    have fileno, calling fileno version of the decoder.
    Traceback (most recent call last):
    
      File "<ipython-input-5-d82315236633>", line 1, in <module>
        dat = img.getdata()
    
      File "C:\Users\kmilos\.conda\envs\dev\lib\site-packages\PIL\Image.py", line 1304, in getdata
        self.load()
    
      File "C:\Users\kmilos\.conda\envs\dev\lib\site-packages\PIL\TiffImagePlugin.py", line 1097, in load
        return self._load_libtiff()
    
      File "C:\Users\kmilos\.conda\envs\dev\lib\site-packages\PIL\TiffImagePlugin.py", line 1209, in _load_libtiff
        raise IOError(err)
    
    OSError: -2
    
    
    In [6]: dat = img.getdata()
    
    In [7]: print(dat)
    <ImagingCore object at 0x000001FC04A55DB0>
    

    Also note that on the second attempt I get an object back, bit if I try to convert to an array, it is filled with zeros, so issue #3863 is not really closed for me.

    No problems if I use 'TIFF' or 'TIFF-FI' formats via imageio, but 'TIFF-PIL' fails with the same error.

    TIFF Windows 
    opened by kmilos 50
  • OSError: invalid face handle

    OSError: invalid face handle

    What did you do?

    I ran the following code:

    from PIL import Image, ImageDraw, ImageFont, features
    
    print(features.check('raqm'))
    print(Image.PILLOW_VERSION)
    
    img = Image.new('RGB', (800, 300), color = (73, 109, 137))
    d = ImageDraw.Draw(img)
    fnt = ImageFont.truetype('NotoSansTibetan-Regular.ttf', 24, layout_engine=ImageFont.LAYOUT_BASIC)
    d.text((10, 10), "༄༅། །སྒྲུབ།", font=fnt, fill=(255, 255, 0))
    img.save('result.png')
    fnt = ImageFont.truetype('NotoSansTibetan-Regular.ttf', 24, layout_engine=ImageFont.LAYOUT_RAQM)
    print("things work until...")
    res = fnt.getmask("༄༅། །སྒྲུབ།", features=['ccmp', 'abvs', 'blws', 'calt', 'liga', 'kern', 'abvm', 'blwm', 'mkmk'])
    

    What did you expect to happen?

    No segfault

    What actually happened?

    Here's the console output:

    True
    5.0.0
    things work until...
    Traceback (most recent call last):
      File "testmarche.py", line 13, in <module>
        res = fnt.getmask("༄༅། །སྒྲུབ།", features=['ccmp', 'abvs', 'blws', 'calt', 'liga', 'kern', 'abvm', 'blwm', 'mkmk'])
      File "/usr/local/lib/python3.5/dist-packages/PIL/ImageFont.py", line 163, in getmask
        return self.getmask2(text, mode, direction=direction, features=features)[0]
      File "/usr/local/lib/python3.5/dist-packages/PIL/ImageFont.py", line 166, in getmask2
        size, offset = self.font.getsize(text, direction, features)
    OSError: invalid face handle
    Erreur de segmentation
    

    What versions of Pillow and Python are you using?

    Bug Fonts Platform 
    opened by eroux 48
  •  ImportError: cannot import name 'PILLOW_VERSION' from 'PIL' (unknown location)

    ImportError: cannot import name 'PILLOW_VERSION' from 'PIL' (unknown location)

    I got this error while importing Image

    from PIL import Image
    Traceback (most recent call last):
    
      File "<ipython-input-13-b7f01c2f8cfe>", line 1, in <module>
        from PIL import Image
    
      File "/lib/python3.7/site-packages/PIL/Image.py", line 40, in <module>
        from . import PILLOW_VERSION, ImageMode, TiffTags, __version__, _plugins
    
    **ImportError:** cannot import name 'PILLOW_VERSION' from 'PIL' (unknown location)
    

    I tried to remove it by myself but then got the same problem with __version__, then _plugins

    Updating doesn't work for me. Can you help please?

    Installation Linux 
    opened by poormag 47
  • Conda: Pillow DLL error when loading Image

    Conda: Pillow DLL error when loading Image

    What did you do?

    I upgraded pillow to 5.0.0 and python to 3.6.30h3b118a2_4 using anaconda prompt. Then i tried... from PIL import Image

    What did you expect to happen?

    I expected that the library would load.

    What actually happened?

    Instead I keep getting this error... from PIL import Image Traceback (most recent call last):

    File "", line 1, in from PIL import Image

    File "C:\Users\bendo\Anaconda3\lib\site-packages\PIL\Image.py", line 58, in from . import _imaging as core

    ImportError: DLL load failed: The specified module could not be found.

    What versions of Pillow and Python are you using?

    Using pillow-5.0.0 and using python-3.6.30h3b118a2_4

    Installation Windows 
    opened by polkadottedwalrus 46
  • Moved conversion test to test_imagecms

    Moved conversion test to test_imagecms

    opened by radarhere 0
  • The problem of using too much memory for synthetic gifs

    The problem of using too much memory for synthetic gifs

    When I use the save method to save the picture list, the generated gif memory is too large. I have used 14 images within 10kb, but the generated gif accounts for about 400k. When I use the same image to generate gif repeatedly, the size of the generated gif is different each time. What is this situation? Can you answer it.

    GIF 
    opened by lxccc812 8
  • Failing to load Image from PIL in macOS with 9.4.0

    Failing to load Image from PIL in macOS with 9.4.0

    We are currently using PIL on macOS inside a VENV to limit packaged. Today when we updated to 9.4.0 PIL stopped working on MacOS (these are x86_64 versions).

    Steps to reproduce:

    1. setup venv (this was seen in python 3.9.4, 3.9.6, and also a 3.8.x version I don't recall)
    2. pip install Pillow
    3. python, from PIL import Image

    (note, some parts of the path were trimmed)

    python3
    > from PIL import Image
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File ".venv/lib/python3.9/site-packages/PIL/Image.py", line 103, in <module>
        from . import _imaging as core
    ImportError: dlopen(.venv/lib/python3.9/site-packages/PIL/_imaging.cpython-39-darwin.so, 2): Library not loaded: @loader_path/libXdmcp.6.dylib
      Referenced from: .venv/lib/python3.9/site-packages/PIL/.dylibs/libxcb.1.1.0.dylib
      Reason: no suitable image found.  Did find:
    	.venv/lib/python3.9/site-packages/PIL/.dylibs/libXdmcp.6.dylib: cannot load 'libXdmcp.6.dylib' (load command 0x80000034 is unknown)
    	.venv/lib/python3.9/site-packages/PIL/.dylibs/libXdmcp.6.dylib: cannot load 'libXdmcp.6.dylib' (load command 0x80000034 is unknown)
    

    Have seen this on two different machines and it was reproducible on both after recreating a venv.

    macOS 
    opened by jbeghtol 6
  • Relaxed child images check to allow for libjpeg

    Relaxed child images check to allow for libjpeg

    Reported in https://github.com/conda-forge/pillow-feedstock/pull/128#issuecomment-1368705067

    test_get_child_images() in test_file_jpeg.py is failing with libjpeg. This PR relaxes the check to test for a similarity of 2.1, instead of equality. I have confirmed this in pillow-wheels with libjpeg 9e.

    JPEG 
    opened by radarhere 5
  • Added QOI reading

    Added QOI reading

    Resolves #6844

    Adds support for reading the QOI image format - https://qoiformat.org/.

    The specification is https://qoiformat.org/qoi-specification.pdf I created the test images using https://www.aconvert.com/image/png-to-qoi/

    Enhancement 
    opened by radarhere 0
Releases(9.4.0)
  • 9.4.0(Jan 2, 2023)

    https://pillow.readthedocs.io/en/stable/releasenotes/9.4.0.html

    Changes

    • Updated copyright year #6845 [@radarhere]
    • Fixed null pointer dereference crash with malformed font #6846 [@radarhere]
    • Return from ImagingFill early if image has a zero dimension #6842 [@radarhere]
    • Reversed deprecations for Image constants, except for duplicate Resampling attributes #6830 [@radarhere]
    • Improve exception traceback readability #6836 [@hugovk]
    • Fix version mismatch #6841 [@smb123w64gb]
    • Do not attempt to read IFD1 if absent #6840 [@radarhere]
    • Fixed writing int as ASCII tag #6800 [@radarhere]
    • If available, use wl-paste or xclip for grabclipboard() on Linux #6783 [@radarhere]
    • Added signed option when saving JPEG2000 images #6709 [@radarhere]
    • Patch OpenJPEG to include ARM64 fix #6718 [@radarhere]
    • Added support for I;16 modes in putdata() #6825 [@radarhere]
    • Added conversion from RGBa to RGB #6708 [@radarhere]
    • Added DDS support for uncompressed L and LA images #6820 [@radarhere]
    • Added LightSource tag values to ExifTags #6749 [@radarhere]
    • Updated libtiff shared library name #6826 [@radarhere]
    • Fixed PyAccess after changing ICO size #6821 [@radarhere]
    • Do not use EXIF from info when saving PNG images #6819 [@radarhere]
    • Fixed saving EXIF data to MPO #6817 [@radarhere]
    • Added Exif hide_offsets() #6762 [@radarhere]
    • Only compare to previous frame when checking for duplicate GIF frames while saving #6787 [@radarhere]
    • Always initialize all plugins in registered_extensions() #6811 [@radarhere]
    • Initialize unsigned char variables #6818 [@radarhere]
    • Updated deprecated NumPy alias #6814 [@radarhere]
    • Ignore non-opaque WebP background when saving as GIF #6792 [@radarhere]
    • Only set tile in ImageFile setstate #6793 [@radarhere]
    • Fixed BytesWarnings #6816 [@radarhere]
    • When reading BLP, do not trust JPEG decoder to determine image is CMYK #6767 [@radarhere]
    • Updated xz to 5.4.0 #6802 [@radarhere]
    • Added IFD enum to ExifTags #6748 [@radarhere]
    • Fixed bug combining GIF frame durations #6779 [@radarhere]
    • Remove unnecessary Pipfile #6790 [@hugovk]
    • Support saving JPEG comments #6774 [@smason]
    • Add support for PyPy3.9, drop PyPy3.7 #6782 [@hugovk]
    • [pre-commit.ci] pre-commit autoupdate #6780 [@pre-commit-ci]
    • Use compile_python_fuzzer #6775 [@radarhere]
    • Remove specific number of jobs from comment #6772 [@radarhere]
    • Fix WebP dealloc method definitions #6763 [@Yay295]
    • Added getxmp() to WebPImagePlugin #6758 [@radarhere]
    • Use stdlib for setuptools on Cygwin #6760 [@radarhere]
    • Added "exact" option when saving WebP #6747 [@ashafaei]
    • Use fractional coordinates when drawing text #6722 [@radarhere]
    • Fixed writing int as BYTE tag #6740 [@radarhere]
    • Remove Tidelift alignment action and badge #6739 [@aclark4life]
    • Updated xz to 5.2.8 #6738 [@radarhere]
    • Added MP Format Version when saving MPO #6735 [@radarhere]
    • Remove ImagingAccessInit line() method #6736 [@Yay295]
    • Update to Python 3.11 in GitHub Actions #6726 [@radarhere]
    • Added Interop to ExifTags #6724 [@radarhere]
    • CVE-2007-4559 patch when building on Windows #6704 [@nulano]
    • [pre-commit.ci] pre-commit autoupdate #6721 [@pre-commit-ci]
    • Fix compiler warning: accessing 64 bytes in a region of size 48 #6714 [@wiredfool]
    • Use verbose flag for pip install #6713 [@wiredfool]
    • Replaced IOError with OSError #6715 [@radarhere]
    • Disable __CxxFrameHandler4 when compiling HarfBuzz #6702 [@nulano]

    Dependencies

    • Updated libtiff to 4.5.0 #6822 [@radarhere]
    • Update actions/stale action to v7 #6813 [@renovate]
    • Updated harfbuzz to 6.0.0 #6810 [@radarhere]
    • Update egor-tensin/cleanup-path action to v3 #6806 [@renovate]
    • Update cygwin/cygwin-install-action action to v3 #6776 [@renovate]
    • Updated xz to 5.2.9 #6770 [@radarhere]
    • Updated libpng to 1.6.39 #6752 [@radarhere]
    • Updated lcms2 to 2.14 #6711 [@radarhere]

    Documentation

    • Updated size parameter descriptions #6851 [@radarhere]
    • Added release notes for #6842 and #6846 #6850 [@radarhere]
    • Document the meaning of "premultiplied alpha" #6838 [@radarhere]
    • Document "transparency" info key #6831 [@radarhere]
    • Clarify apply_transparency() docstring #6798 [@radarhere]
    • Improved mode range documentation #6795 [@radarhere]
    • Added releases notes for #6774 #6784 [@radarhere]
    • Use Sphinx Inline Tabs to organise installation per OS #6764 [@hugovk]
    • Document how to install Pillow from a directory #6756 [@radarhere]
    • Add oss-fuzz badge #6717 [@wiredfool]
    • Updated macOS tested Pillow versions #6734 [@radarhere]

    Testing

    • Removed Python 3.7 on Cygwin #6815 [@radarhere]
    • Run Bandit on CI via pre-commit #6805 [@hugovk]
    • Add allowlist_externals=make to fix tox 4 #6801 [@hugovk]
    • Added Fedora 37 #6742 [@radarhere]
    • Revert "Install NumPy with OpenBLAS" #6727 [@radarhere]
    • Updated AppVeyor to Python 3.11 #6723 [@radarhere]
    • Added file to list of partially supported BMPs #6719 [@radarhere]
    • XCB will not be used by default on Linux if gnome-screenshot is present #6712 [@radarhere]
    • Removed Fedora 35 #6705 [@radarhere]
    • Add xfail mark to TestEmbeddable #6703 [@nulano]
    Source code(tar.gz)
    Source code(zip)
  • 9.3.0(Oct 29, 2022)

    https://pillow.readthedocs.io/en/stable/releasenotes/9.3.0.html

    Changes

    • Initialize libtiff buffer when saving #6699 [@radarhere]
    • Limit SAMPLESPERPIXEL to avoid runtime DOS #6700 [@wiredfool]
    • Inline fname2char to fix memory leak #6329 [@nulano]
    • Fix memory leaks related to text features #6330 [@nulano]
    • Use double quotes for version check on old CPython on Windows #6695 [@hugovk]
    • GHA: replace deprecated set-output command with GITHUB_OUTPUT file #6697 [@nulano]
    • Remove backup implementation of Round for Windows platforms #6693 [@cgohlke]
    • Upload fribidi.dll to GitHub Actions #6532 [@nulano]
    • Fixed set_variation_by_name offset #6445 [@radarhere]
    • Windows build improvements #6562 [@nulano]
    • Fix malloc in _imagingft.c:font_setvaraxes #6690 [@cgohlke]
    • Only use ASCII characters in C source file #6691 [@cgohlke]
    • Release Python GIL when converting images using matrix operations #6418 [@hmaarrfk]
    • Added ExifTags enums #6630 [@radarhere]
    • Do not modify previous frame when calculating delta in PNG #6683 [@radarhere]
    • Added support for reading BMP images with RLE4 compression #6674 [@npjg]
    • Decode JPEG compressed BLP1 data in original mode #6678 [@radarhere]
    • pylint warnings #6659 [@marksmayo]
    • Added GPS TIFF tag info #6661 [@radarhere]
    • Added conversion between RGB/RGBA/RGBX and LAB #6647 [@radarhere]
    • Do not attempt normalization if mode is already normal #6644 [@radarhere]
    • Fixed seeking to an L frame in a GIF #6576 [@radarhere]
    • Consider all frames when selecting mode for PNG save_all #6610 [@radarhere]
    • Don't reassign crc on ChunkStream close #6627 [@radarhere]
    • Raise a warning if NumPy failed to raise an error during conversion #6594 [@radarhere]
    • Only read a maximum of 100 bytes at a time in IMT header #6623 [@radarhere]
    • Show all frames in ImageShow #6611 [@radarhere]
    • Allow FLI palette chunk to not be first #6626 [@radarhere]
    • If first GIF frame has transparency for RGB_ALWAYS loading strategy, use RGBA mode #6592 [@radarhere]
    • Round box position to integer when pasting embedded color #6517 [@radarhere]
    • Removed EXIF prefix when saving WebP #6582 [@radarhere]
    • Pad IM palette to 768 bytes when saving #6579 [@radarhere]
    • Added DDS BC6H reading #6449 [@ShadelessFox]
    • Added support for opening WhiteIsZero 16-bit integer TIFF images #6642 [@JayWiz]
    • Raise an error when allocating translucent color to RGB palette #6654 [@jsbueno]
    • Moved mode check outside of loops #6650 [@radarhere]
    • Added reading of TIFF child images #6569 [@radarhere]
    • Improved ImageOps palette handling #6596 [@PososikTeam]
    • Defer parsing of palette into colors #6567 [@radarhere]
    • Apply transparency to P images in ImageTk.PhotoImage #6559 [@radarhere]
    • Use rounding in ImageOps contain() and pad() #6522 [@bibinhashley]
    • Fixed GIF remapping to palette with duplicate entries #6548 [@radarhere]
    • Allow remap_palette() to return an image with less than 256 palette entries #6543 [@radarhere]
    • Corrected BMP and TGA palette size when saving #6500 [@radarhere]
    • Move some static config to setup.cfg #6570 [@hugovk]
    • Do not call load() before draft() in Image.thumbnail #6539 [@radarhere]
    • Use constants in TiffImagePlugin #6552 [@radarhere]
    • Copy palette when converting from P to PA #6497 [@radarhere]
    • Allow RGB and RGBA values for PA image putpixel #6504 [@radarhere]
    • Removed support for tkinter in PyPy before Python 3.6 #6551 [@nulano]
    • Do not use CCITTFaxDecode filter if libtiff is not available #6518 [@radarhere]
    • Fallback to not using mmap if buffer is not large enough #6510 [@radarhere]
    • Fixed writing bytes as ASCII tag #6493 [@radarhere]
    • Open 1 bit EPS in mode 1 #6499 [@radarhere]
    • Removed support for tkinter before Python 1.5.2 #6549 [@radarhere]
    • Fixed typo #6542 [@radarhere]
    • NumPy now supports Python 3.11 #6538 [@radarhere]
    • Build lcms2 VC2022 #6529 [@radarhere]
    • Added direct conversion from PA to P #6509 [@radarhere]
    • Allow default ImageDraw font to be set #6484 [@radarhere]
    • Save 1 mode PDF using CCITTFaxDecode filter #6470 [@radarhere]
    • Added support for RGBA PSD images #6481 [@radarhere]
    • Parse orientation from XMP tag contents #6463 [@bigcat88]
    • Added support for reading ATI1/ATI2 (BC4/BC5) DDS images #6457 [@REDxEYE]
    • Do not clear GIF tile when checking number of frames #6455 [@radarhere]
    • Support saving multiple MPO frames #6444 [@radarhere]
    • Moved tile encoding into separate function #6456 [@radarhere]
    • Do not double quote Pillow version for setuptools >= 60 #6450 [@radarhere]
    • 3.11: Add Trove classifier and to tox.ini and update setup.py version check #6441 [@hugovk]
    • Added ABGR BMP mask mode #6436 [@radarhere]
    • Fixed PSDraw rectangle #6429 [@radarhere]
    • Raise ValueError if PNG sRGB chunk is truncated #6431 [@radarhere]
    • Handle missing Python executable in ImageShow on macOS #6416 [@bryant1410]

    Dependencies

    • Updated harfbuzz to 5.3.1 #6669 [@radarhere]
    • Updated zlib to 1.2.13 #6664 [@radarhere]
    • Updated harfbuzz to 5.3.0 #6651 [@radarhere]
    • Update github-actions #6616 [@renovate]
    • Updated Ghostscript to 10.0.0 #6609 [@radarhere]
    • Fix Renovate config #6599 [@hugovk]
    • Configure Renovate #6564 [@renovate]
    • Updated harfbuzz to 5.2.0 #6591 [@radarhere]
    • [pre-commit.ci] pre-commit autoupdate #6560 [@pre-commit-ci]
    • Updated libimagequant to 4.0.4 #6535 [@radarhere]
    • Updated libimagequant to 4.0.2 #6523 [@radarhere]
    • Updated libwebp to 1.2.4 #6483 [@radarhere]
    • [pre-commit.ci] pre-commit autoupdate #6472 [@pre-commit-ci]
    • Updated harfbuzz to 5.1.0 #6466 [@radarhere]
    • Updated libimagequant to 4.0.1 #6451 [@radarhere]
    • Updated libwebp to 1.2.3 #6442 [@radarhere]

    Documentation

    • Update release notes for 9.3.0 #6696 [@hugovk]
    • Document ImageDraw attributes #6533 [@nulano]
    • Added release notes for #6630 #6685 [@radarhere]
    • Document when BLP1 JPEG data started being loaded incorrectly #6682 [@radarhere]
    • Added release notes for #6678 #6680 [@radarhere]
    • Added release notes for #6449 and #6611 #6668 [@radarhere]
    • Image channel is used when converting PA with an RGBA palette #6662 [@radarhere]
    • High bit depth multichannel images are not yet supported #6638 [@radarhere]
    • Improved layout_engine documentation #6633 [@radarhere]
    • Improved documentation of ImageDraw return values #6556 [@radarhere]
    • Added headings before listing options #6632 [@radarhere]
    • Improve documentation for ImageDraw.rectangle and rounded_rectangle #6625 [@d0sboots]
    • Ensure dependencies are installed when building docs #6612 [@radarhere]
    • Fixed broken URLs #6617 [@radarhere]
    • Updated redirected URLs #6613 [@radarhere]
    • Add OpenSSF Best Practices badge #6597 [@hugovk]
    • Corrected dictionary name #6593 [@radarhere]
    • Simplified enum references #6557 [@radarhere]
    • Documented TGA save keyword arguments #6546 [@radarhere]
    • Updated tested Windows environment list #6550 [@radarhere]
    • DOC: fix image-file-formats.rst #6513 [@cgohlke]
    • Ubuntu dependencies also apply to Jammy #6511 [@radarhere]
    • Orientation data is removed by exif_transpose() #6476 [@radarhere]
    • Note to Windows users that FreeType will keep the font file open #6485 [@radarhere]
    • Switch to GitHub Actions artifacts for Windows wheels #6458 [@radarhere]
    • Added release notes for #6457 #6465 [@radarhere]
    • Docs: Replace version tables with RST csv-table and add 3.11 #6433 [@hugovk]
    • Fix simple typo #6443 [@timgates42]
    • Docs: Allow setting Python interpreter via command line #6440 [@hugovk]
    • Updated links #6427 [@radarhere]
    • Updated macOS tested Pillow versions #6425 [@radarhere]
    • Document where to find other codecs #6415 [@radarhere]

    Testing

    • GitHub Actions: Test Python 3.11.0 final #6686 [@hugovk]
    • Consistently write in binary format in PPM tests #6677 [@radarhere]
    • Removed print statement from tests #6660 [@radarhere]
    • Parametrized tests #6634 [@radarhere]
    • Do not import PIL.Image #6635 [@radarhere]
    • Add "concurrency" to GitHub Actions #6621 [@Yay295]
    • Updated codecov action to v3 #6281 [@radarhere]
    • Use fixtures instead of classes in test_imagefont #6534 [@nulano]
    • Parametrize more tests #6531 [@Yay295]
    • [pre-commit.ci] pre-commit autoupdate #6560 [@pre-commit-ci]
    • Updated tested Windows environment list #6550 [@radarhere]
    • Set top-level permissions for remaining GitHub Actions #6541 [@radarhere]
    • Parametrized tests #6526 [@radarhere]
    • Parametrize Tests/test_image_paste.py #6519 [@Yay295]
    • Temporarily skip valgrind failure #6524 [@radarhere]
    • Do not install test-image-results on GitHub Actions #6501 [@radarhere]
    • Updated libjpeg-turbo to 2.1.4 #6498 [@radarhere]
    • Increased test tolerance to allow for libtiff with libjpeg-turbo #6477 [@radarhere]
    • Updated Valgrind job to Jammy #6473 [@radarhere]
    • [pre-commit.ci] pre-commit autoupdate #6472 [@pre-commit-ci]
    • Install libxcb-shape0 #6438 [@radarhere]
    • Set permissions for GitHub actions #6413 [@neilnaveen]
    Source code(tar.gz)
    Source code(zip)
  • 9.2.0(Jul 1, 2022)

    https://pillow.readthedocs.io/en/stable/releasenotes/9.2.0.html

    Changes

    • Fixed null check for fribidi_version_info in FriBiDi shim #6376 [@nulano]
    • Added GIF decompression bomb check #6402 [@radarhere]
    • Handle PCF fonts files with less than 256 characters #6386 [@dawidcrivelli]
    • Improved GIF optimize condition #6378 [@raygard]
    • Reverted to array_interface with the release of NumPy 1.23 #6394 [@radarhere]
    • Pad PCX palette to 768 bytes when saving #6391 [@radarhere]
    • Fixed bug with rounding pixels to palette colors #6377 [@btrekkie]
    • Use gnome-screenshot on Linux if available #6361 [@radarhere]
    • Fixed loading L mode BMP RLE8 images #6384 [@radarhere]
    • Fixed incorrect operator in ImageCms error #6370 [@LostBenjamin]
    • Limit FPX tile size to avoid extending outside image #6368 [@radarhere]
    • Added support for decoding plain PPM formats #5242 [@Piolie]
    • Added apply_transparency() #6352 [@radarhere]
    • Fixed behaviour change from endian fix #6197 [@radarhere]
    • Use python3 #6222 [@radarhere]
    • Allow remapping P images with RGBA palettes #6350 [@radarhere]
    • Revert "Skip test_realloc_overflow unless libtiff 4.0.4 or higher" #6354 [@radarhere]
    • [pre-commit.ci] pre-commit autoupdate #6353 [@pre-commit-ci]
    • Only import ImageFont in ImageDraw when necessary #6341 [@radarhere]
    • Fixed drawing translucent 1px high polygons #6278 [@radarhere]
    • Pad COLORMAP to 768 items when saving TIFF #6232 [@radarhere]
    • Fix P -> PA conversion #6337 [@RedShy]
    • Once exif data is parsed, do not reload unless it changes #6335 [@radarhere]
    • Only try to connect discontiguous corners at the end of edges #6303 [@radarhere]
    • Improve transparency handling when saving GIF images #6176 [@radarhere]
    • Do not update GIF frame position until local image is found #6219 [@radarhere]
    • Netscape GIF extension belongs after the global color table #6211 [@radarhere]
    • Only write GIF comments at the beginning of the file #6300 [@raygard]
    • Separate multiple GIF comment blocks with newlines #6294 [@raygard]
    • Always use GIF89a for comments #6292 [@raygard]
    • Ignore compression value from BMP info dictionary when saving as TIFF #6231 [@radarhere]
    • If font is file-like object, do not re-read from object to get variant #6234 [@radarhere]
    • Raise ValueError when trying to access internal fp after close #6213 [@radarhere]
    • Support more affine expression forms in im.point() #6254 [@benrg]
    • Include 'twine check' in 'make sdist' #6305 [@hugovk]
    • Ensure that furthest v is set in quantize2 #6256 [@radarhere]

    Dependencies

    • Updated harfbuzz to 4.4.1 #6401 [@radarhere]
    • Updated harfbuzz to 4.4.0 #6397 [@radarhere]
    • Use SourceForge auto mirror capability #6345 [@raygard]
    • Updated libtiff to 4.4.0 #6339 [@radarhere]
    • Updated harfbuzz to 4.3.0 #6315 [@radarhere]

    Deprecations

    • Deprecate ImageFont.getsize and related functions #6381 [@nulano]

    Documentation

    • Install furo if it is not available #6408 [@radarhere]
    • Added release notes for #6402 #6403 [@radarhere]
    • Docs: remove redundant search page from table of contents #6399 [@hugovk]
    • Added pytest-timeout to test dependencies #6301 [@radarhere]
    • Fix Sphinx 5 warning by setting docs language #6347 [@hugovk]
    • Include #6178 in release notes #6346 [@radarhere]
    • Updated macOS tested Pillow versions #6316 [@radarhere]
    • Add Sphinx Lint to pre-commit and fix RST bug #6340 [@hugovk]
    • Added EMF and SUN to list of supported file formats #6338 [@radarhere]
    • Once a GIF comment is loaded, it is kept for subsequent frames #6325 [@radarhere]
    • Link to GitHub discussions in CONTRIBUTING #6333 [@radarhere]
    • Improved image file formats documentation #6313 [@radarhere]

    Testing

    • Add Sphinx Lint to pre-commit and fix RST bug #6340 [@hugovk]
    • pre-commit autoupdate #6223 [@radarhere]
    • Upgrade non-amd64 Ubuntu jobs to Jammy #6306 [@radarhere]
    Source code(tar.gz)
    Source code(zip)
  • 9.1.1(May 17, 2022)

    This release addresses several security problems.

    CVE-2022-30595: When reading a TGA file with RLE packets that cross scan lines, Pillow reads the information past the end of the first line without deducting that from the length of the remaining file data. This vulnerability was introduced in Pillow 9.1.0, and can cause a heap buffer overflow.

    Opening an image with a zero or negative height has been found to bypass a decompression bomb check. This will now raise a SyntaxError instead, in turn raising a PIL.UnidentifiedImageError.

    Source code(tar.gz)
    Source code(zip)
  • 9.1.0(Apr 1, 2022)

    https://pillow.readthedocs.io/en/stable/releasenotes/9.1.0.html

    Changes

    • Add support for multiple component transformation to JPEG2000 #5500 [@scaramallion]
    • Fix loading FriBiDi on Alpine #6165 [@nulano]
    • Added setting for converting GIF P frames to RGB #6150 [@radarhere]
    • Allow 1 mode images to be inverted #6034 [@radarhere]
    • Raise ValueError when trying to save empty JPEG #6159 [@radarhere]
    • Always save TIFF with contiguous planar configuration #5973 [@radarhere]
    • Connected discontiguous polygon corners #5980 [@radarhere]
    • Corrected memory allocation #5958 [@radarhere]
    • Ensure Tkinter hook is activated for getimage() #6032 [@radarhere]
    • Fixed comparison warnings #5970 [@radarhere]
    • Use screencapture arguments to crop on macOS #6152 [@radarhere]
    • Do not mark L mode JPEG as 1 bit in PDF #6151 [@radarhere]
    • Fixed saving L mode GIF with background as WebP #6147 [@radarhere]
    • Do not expand GIF during n_frames #6148 [@radarhere]
    • Added support for reading I;16R TIFF images #6132 [@radarhere]
    • If an error occurs after creating a file, remove the file #6134 [@radarhere]
    • decode() should return -1 when finished #6130 [@radarhere]
    • Fixed calling DisplayViewer or XVViewer without a title #6136 [@radarhere]
    • Retain RGBA transparency when saving multiple GIF frames #6128 [@radarhere]
    • Save additional ICO frames with other bit depths if supplied #6122 [@radarhere]
    • Handle EXIF data truncated to just the header #6124 [@radarhere]
    • Added support for reading BMP images with RLE8 compression #6102 [@radarhere]
    • Support Python distributions where _tkinter is compiled in #6006 [@lukegb]
    • Added WebP default duration of zero when saving #6140 [@radarhere]
    • Added support for PPM arbitrary maxval #6119 [@radarhere]
    • Removed unused variable #6137 [@radarhere]
    • libwebp 1.2.2 fixed endian bugs #5984 [@radarhere]
    • Added BigTIFF reading #6097 [@radarhere]
    • GIF seek performance improvements #6077 [@radarhere]
    • Removed load_prepare nearly identical to ImageFile load_prepare #6116 [@radarhere]
    • When converting, clip I;16 to be unsigned, not signed #6112 [@radarhere]
    • Check if self.im is not None #6108 [@radarhere]
    • Fixed loading L mode GIF with transparency #6086 [@radarhere]
    • Ensure cleanup() is called for PyEncoders #6096 [@radarhere]
    • Various _accept changes #6092 [@radarhere]
    • Improved handling of PPM header #5121 [@Piolie]
    • Reset size when seeking away from "Large Thumbnail" MPO frame #6101 [@radarhere]
    • Replace requirements.txt with extras #6072 [@hugovk]
    • Added PyEncoder and support BLP saving #6069 [@radarhere]
    • Handle TGA images with packets that cross scan lines #6087 [@radarhere]
    • Added FITS reading #6056 [@radarhere]
    • Added rawmode argument to Image.getpalette() #6061 [@radarhere]
    • Fixed BUFR, GRIB and HDF5 stub saving #6071 [@radarhere]
    • Changed quantize default dither to FLOYDSTEINBERG #6068 [@radarhere]
    • Do not automatically remove temporary ImageShow files on Unix #6045 [@radarhere]
    • Correctly read JPEG compressed BLP images #4685 [@Meithal]
    • Merged _MODE_CONV typ into ImageMode as typestr #6057 [@radarhere]
    • Consider palette size when converting and in getpalette() #6060 [@radarhere]
    • Added enums #5954 [@radarhere]
    • Ensure image is opaque after converting P to PA with RGB palette #6052 [@radarhere]
    • Replaced absolute PIL import with relative import #6058 [@radarhere]
    • Attach RGBA palettes from putpalette() when suitable #6054 [@radarhere]
    • Simplified code #6053 [@radarhere]
    • Clarify code and comments #6042 [@radarhere]
    • Added get_photoshop_blocks() to parse Photoshop TIFF tag #6030 [@radarhere]
    • Drop excess values in BITSPERSAMPLE #6041 [@mikhail-iurkov]
    • Issue warning if Raqm layout is requested, but Raqm is not available #6035 [@nulano]
    • Added unpacker from RGBA;15 to RGB #6031 [@radarhere]

    Dependencies

    • Updated freetype to 2.12 #6169 [@radarhere]
    • Updated harfbuzz to 4.2.0 #6164 [@radarhere]
    • Updated zlib to 1.2.12 #6160 [@radarhere]
    • Updated harfbuzz to 4.1.0 #6153 [@radarhere]
    • Updated harfbuzz to 4.0.1 #6125 [@radarhere]
    • Updated harfbuzz to 4.0.0 #6104 [@radarhere]
    • Updated harfbuzz to 3.4.0 #6048 [@radarhere]
    • Updated lcms2 to 2.13.1 #6017 [@radarhere]
    • Updated harfbuzz to 3.3.2 #6029 [@radarhere]
    • Updated libimagequant to 4.0.0 #6014 [@radarhere]

    Documentation

    • Add musllinux wheels to 9.1.0 release notes #6168 [@hugovk]
    • Document "keep" for JPEG save quality option #6135 [@carandraug]
    • Document support for RLE8 reading in BMP #6155 [@radarhere]
    • Removed period before colon #6143 [@radarhere]
    • Added merging images example #6129 [@radarhere]
    • decode() should return -1 when finished #6117 [@radarhere]
    • Improved codec documentation #6094 [@radarhere]
    • Document alternatives to accessing individual pixels #6099 [@radarhere]
    • Document that histogram() uses 256 bins per channel #6106 [@radarhere]
    • Added release notes for #6069 #6095 [@radarhere]
    • Improved ImageShow documentation #6078 [@radarhere]
    • Corrected docstring #6081 [@radarhere]
    • Corrected JPEG subsampling documentation #6067 [@radarhere]
    • Use --no-binary when installing from source #6066 [@radarhere]
    • macOS: 'brew install openjpeg' for JPEG2000 support #6065 [@hugovk]
    • Updated comment #6063 [@radarhere]
    • Updated macOS tested Pillow versions #6038 [@radarhere]
    • Fix return in docs #6040 [@hugovk]
    • Corrected sentence #6016 [@radarhere]

    Testing

    • Added pytest-timeout to AppVeyor #6157 [@radarhere]
    • Do not always require ctypes in tests #6141 [@radarhere]
    • Updated setup-python, checkout and upload-artifact actions to v3 #6111 [@radarhere]
    • pre-commit autoupdate --freeze #6109 [@radarhere]
    • Updated Python for doccheck to 3.10 #6098 [@radarhere]
    • Updated libjpeg-turbo to 2.1.3 #6091 [@radarhere]
    • Enable heap verification without gflags #6089 [@radarhere]
    • Test that n_frames and is_animated do not change GIF #6080 [@radarhere]
    • Added Gentoo to Docker jobs #6088 [@radarhere]
    • Removed duplicate test #6082 [@radarhere]
    • Updated checks that no warnings were raised #6076 [@radarhere]
    • Updated comment #6063 [@radarhere]
    • Replaced test image to avoid copyrighted color space #6062 [@radarhere]
    • Only skip test if libimagequant is earlier than 4 on ppc64le #6050 [@radarhere]
    • Added CentOS Stream 9 #6036 [@radarhere]
    • Upgraded AppVeyor Python 3.10 image to Visual Studio 2022 #6026 [@radarhere]
    Source code(tar.gz)
    Source code(zip)
  • 9.0.1(Feb 3, 2022)

    https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html

    Changes

    • In show_file, use os.remove to remove temporary images. CVE-2022-24303 #6010 [@radarhere, @hugovk]
    • Restrict builtins within lambdas for ImageMath.eval. CVE-2022-22817 #6009 [radarhere]
    Source code(tar.gz)
    Source code(zip)
  • 9.0.0(Jan 2, 2022)

    https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html

    Changes

    • Restrict builtins for ImageMath.eval() #5923 [@radarhere]
    • Ensure JpegImagePlugin stops at the end of a truncated file #5921 [@radarhere]
    • Fixed ImagePath.Path array handling #5920 [@radarhere]
    • Remove consecutive duplicate tiles that only differ by their offset #5919 [@radarhere]
    • Removed redundant part of condition #5915 [@radarhere]
    • Explicitly enable strip chopping for large uncompressed TIFFs #5517 [@kmilos]
    • Use the Windows method to get TCL functions on Cygwin #5807 [@DWesl]
    • Changed error type to allow for incremental WebP parsing #5404 [@radarhere]
    • Improved I;16 operations on big endian #5901 [@radarhere]
    • Ensure that BMP pixel data offset does not ignore palette #5899 [@radarhere]
    • Limit quantized palette to number of colors #5879 [@radarhere]
    • Use latin1 encoding to decode bytes #5870 [@radarhere]
    • Fixed palette index for zeroed color in FASTOCTREE quantize #5869 [@radarhere]
    • When saving RGBA to GIF, make use of first transparent palette entry #5859 [@radarhere]
    • Pass SAMPLEFORMAT to libtiff #5848 [@radarhere]
    • Added rounding when converting P and PA #5824 [@radarhere]
    • Improved putdata() documentation and data handling #5910 [@radarhere]
    • Exclude carriage return in PDF regex to help prevent ReDoS #5912 [@radarhere]
    • Image.NONE is only used for resampling and dithers #5908 [@radarhere]
    • Fixed freeing pointer in ImageDraw.Outline.transform #5909 [@radarhere]
    • Add Tidelift alignment action and badge #5763 [@aclark4life]
    • Replaced further direct invocations of setup.py #5906 [@radarhere]
    • Added ImageShow support for xdg-open #5897 [@m-shinder]
    • Fixed typo #5902 [@radarhere]
    • Switched from deprecated "setup.py install" to "pip install ." #5896 [@radarhere]
    • Support 16-bit grayscale ImageQt conversion #5856 [@cmbruns]
    • Fixed raising OSError in _safe_read when size is greater than SAFEBLOCK #5872 [@radarhere]
    • Convert subsequent GIF frames to RGB or RGBA #5857 [@radarhere]
    • WebP: Fix memory leak during decoding on failure #5798 [@ilai-deutel]
    • Do not prematurely return in ImageFile when saving to stdout #5665 [@infmagic2047]
    • Added support for top right and bottom right TGA orientations #5829 [@radarhere]
    • Corrected ICNS file length in header #5845 [@radarhere]
    • Block tile TIFF tags when saving #5839 [@radarhere]
    • Added line width argument to ImageDraw polygon #5694 [@radarhere]
    • Do not redeclare class each time when converting to NumPy #5844 [@radarhere]
    • Only prevent repeated polygon pixels when drawing with transparency #5835 [@radarhere]
    • Fix pushes_fd method signature #5833 [@hoodmane]
    • Add support for pickling TrueType fonts #5826 [@hugovk]
    • Only prefer command line tools SDK on macOS over default MacOSX SDK #5828 [@radarhere]
    • Fix compilation on 64-bit Termux #5793 [@landfillbaby]
    • Replace 'setup.py sdist' with '-m build --sdist' #5785 [@hugovk]
    • Use declarative package configuration #5784 [@hugovk]
    • Use title for display in ImageShow #5788 [@radarhere]
    • Fix for PyQt6 #5775 [@hugovk]
    • Rename master to main #5770 [@hugovk]

    Dependencies

    • Updated winbuild libimagequant to 2.17.0 #5916 [@radarhere]
    • Updated harfbuzz to 3.2.0 #5883 [@radarhere]
    • Updated libimagequant to 2.17.0 #5876 [@radarhere]
    • Updated freetype to 2.11.1 #5867 [@radarhere]
    • Updated harfbuzz to 3.1.2 #5853 [@radarhere]
    • Updated harfbuzz to 3.1.1 #5820 [@radarhere]
    • Updated harfbuzz to 3.1.0 #5808 [@radarhere]

    Documentation

    • CVEs TBD #5924 [@radarhere]
    • Added release notes for #5919, #5920 and #5921 #5922 [@radarhere]
    • Updated copyright year #5918 [@radarhere]
    • Added release notes for pillow-wheels#237 #5917 [@radarhere]
    • Added release notes for #5897 #5905 [@radarhere]
    • Added PIL + pathlib Tutorial #5862 [@kolibril13]
    • Dedicate the next release to Fredrik Lundh #5885 [@hugovk]
    • Added release notes for #5857 #5874 [@radarhere]
    • Improved example code #5866 [@radarhere]
    • Improved explanation of fromarray "mode" parameter #5849 [@radarhere]
    • Documentation for #5829 and #5694 #5847 [@radarhere]
    • Updated macOS tested Pillow versions #5822 [@radarhere]
    • Docs: Remove docutils pin #5821 [@hugovk]
    • Changed URLs to https #5796 [@radarhere]
    • Added release notes for #5788 #5792 [@radarhere]
    • Update expected Pillow 10 release date: 2023-07-01 #5779 [@hugovk]
    • Document #5788: "Use title for display" #5790 [@nulano]
    • Improved image lifecycle documentation #5773 [@radarhere]
    • Docs: No security updates in 8.4.0 #5767 [@hugovk]

    Removals

    • Drop support for soon-EOL Python 3.6 #5768 [@hugovk]
    • Remove support for FreeType 2.7 and older #5777 [@hugovk]
    • Removed deprecated PILLOW_VERSION, Image.show command parameter, Image._showxv and ImageFile.raise_ioerror #5776 [@radarhere]

    Testing

    • Added sys import #5913 [@radarhere]
    • Do not compare properties to themselves #5907 [@radarhere]
    • GHA: Still use macos-latest for non-PyPy builds #5888 [@radarhere]
    • GHA: Use macos-10.15 to fix build #5886 [@hugovk]
    • GHA: Add workflow_dispatch to enable manually triggering builds #5861 [@hugovk]
    • Added context managers #5851 [@radarhere]
    • Updated libjpeg-turbo to 2.1.2 #5841 [@radarhere]
    • GHA: Use actions/setup-python's pip cache #5840 [@hugovk]
    • Removed setuptools install from AppVeyor #5823 [@radarhere]
    • Added Fedora 35 #5806 [@radarhere]
    • Test Python 3.10.0 final on AppVeyor #5805 [@hugovk]
    • Test PyPy3.8 #5778 [@hugovk]
    • CI: Install pytest-timeout for MinGW CI #5780 [@hugovk]
    • Removed Fedora 33 docker job #5766 [@radarhere]
    Source code(tar.gz)
    Source code(zip)
  • 8.4.0(Oct 15, 2021)

    https://pillow.readthedocs.io/en/stable/releasenotes/8.4.0.html

    Changes

    • Don't use bitmap glyphs when drawing text with stroker #5761 [@nulano]
    • Make TIFF strip size configurable #5744 [@kmilos]
    • Fixed Python errors when saving a (0, 0) TIFF image #5750 [@radarhere]
    • Prefer global transparency in GIF when replacing with background color #5756 [@radarhere]
    • Update winbuild libimagequant to 2.16.0 #5727 [@nulano]
    • Accept methods cleanup #5724 [@radarhere]
    • Remove raqm.cmake #5722 [@nulano]
    • Moved _info function into docstring #5710 [@radarhere]
    • Added "exif" keyword argument to TIFF saving #5575 [@radarhere]
    • Copy Python palette to new image in quantize() #5696 [@radarhere]
    • Read ICO AND mask from end #5667 [@radarhere]
    • Actually check the framesize in FliDecode.c #5659 [@wiredfool]

    Dependencies

    • Upgrade Raqm to 0.7.2 #5736 [@nulano]
    • Updated Ghostscript to 9.55.0 #5735 [@radarhere]
    • Updated fribidi to 1.0.11 #5732 [@radarhere]
    • Updated libimagequant to 2.16.0 #5726 [@radarhere]
    • Updated harfbuzz to 3.0.0 #5720 [@radarhere]
    • Updated harfbuzz to 2.9.1 #5705 [@radarhere]

    Documentation

    • Updated capitalization #5746 [@radarhere]
    • Updated macOS tested Pillow versions #5737 [@radarhere]
    • Updated macOS tested Pillow versions #5719 [@radarhere]
    • Docs: Update CI targets table #5713 [@hugovk]
    • Updated docstring #5708 [@radarhere]
    • Docs: Temporarily pin docutils to fix bullets in sphinx_rtd_theme #5704 [@hugovk]

    Testing

    • Delete tidelift.yml #5765 [@hugovk]
    • Test Python 3.10.0 final on GitHub Actions #5748 [@hugovk]
    • [pre-commit.ci] pre-commit autoupdate #5747 [@pre-commit-ci]
    • Add CentOS Stream 8 #5714 [@hugovk]
    • Improve the fuzzer wrt. the current atheris version #5688 [@Google-Autofuzz]
    • CI: Split MINGW to own workflow, remove redundant job #5709 [@hugovk]
    • Install numpy on Python 3.10 #5702 [@radarhere]
    Source code(tar.gz)
    Source code(zip)
  • 8.3.2(Sep 2, 2021)

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.2.html

    Security

    • CVE-2021-23437 Raise ValueError if color specifier is too long [hugovk, radarhere]

    • Fix 6-byte OOB read in FliDecode [wiredfool]

    Python 3.10 wheels

    • Add support for Python 3.10 #5569, #5570 [hugovk, radarhere]

    Fixed regressions

    • Ensure TIFF RowsPerStrip is multiple of 8 for JPEG compression #5588 [kmilos, radarhere]

    • Updates for ImagePalette channel order #5599 [radarhere]

    • Hide FriBiDi shim symbols to avoid conflict with real FriBiDi library #5651 [nulano]

    Source code(tar.gz)
    Source code(zip)
  • 8.3.1(Jul 7, 2021)

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.1.html

    Changes

    • Catch OSError when checking if fp is sys.stdout #5585 [@radarhere]
    • Handle removing orientation from alternate types of EXIF data #5584 [@radarhere]
    • Make Image.array take optional dtype argument #5572 [@t-vi]
    Source code(tar.gz)
    Source code(zip)
  • 8.3.0(Jul 1, 2021)

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.0.html

    Changes

    • Use snprintf instead of sprintf #5567 [@radarhere]
    • Limit TIFF strip size when saving with LibTIFF #5514 [@kmilos]
    • Allow ICNS save on all operating systems #4526 [@newpanjing]
    • De-zigzag JPEG's DQT when loading; deprecate convert_dict_qtables #4989 [@gofr]
    • Do not use background or transparency index for new color #5564 [@radarhere]
    • Simplified code #5315 [@radarhere]
    • Replaced xml.etree.ElementTree #5565 [@radarhere]
    • Corrected border position for P mode in ImageOps.expand() #5562 [@radarhere]
    • Moved CVE image to pillow-depends #5561 [@radarhere]
    • Added tag data for IFD groups #5554 [@radarhere]
    • Improved ImagePalette #5552 [@radarhere]
    • Add DDS saving #5402 [@radarhere]
    • Improved getxmp() #5455 [@radarhere]
    • Convert to float for comparison with float in IFDRational eq #5412 [@radarhere]
    • Allow getexif() to access TIFF tag_v2 data #5416 [@radarhere]
    • Read FITS image mode and size #5405 [@radarhere]
    • Merge parallel horizontal edges in ImagingDrawPolygon #5347 [@radarhere]
    • Use transparency behind first GIF frame and when disposing to background #5557 [@radarhere]
    • Fixed undefined variable in logging #5556 [@radarhere]
    • Avoid unstable nature of qsort in Quant.c #5367 [@radarhere]
    • Copy palette to new images in ImageOps expand #5551 [@radarhere]
    • Ensure palette string matches RGB mode #5549 [@radarhere]
    • Do not modify EXIF of original image instance in exif_transpose() #5547 [@radarhere]
    • Fixed default numresolution for small JPEG2000 images #5540 [@radarhere]
    • Fixed format warning #5535 [@radarhere]
    • Updated declaration to match definition #5534 [@radarhere]
    • Added DDS BC5 reading #5501 [@radarhere]
    • Raise an error if ImageDraw.textbbox is used without a TrueType font #5510 [@radarhere]
    • Added ICO saving in BMP format #5513 [@radarhere]
    • Ensure PNG seeks to end of previous chunk at start of load_end #5493 [@radarhere]
    • Do not allow TIFF to seek to a past frame #5473 [@radarhere]
    • Avoid race condition when displaying images with eog #5507 [@mconst]
    • Added specific error messages when ink has incorrect number of bands #5504 [@radarhere]
    • Allow converting an image to a numpy array to raise errors #5379 [@radarhere]
    • Use METH_NOARGS when no arguments are required #5488 [@radarhere]
    • Fixed typo #5505 [@radarhere]
    • Added CFAPattern, ExifVersion and FlashpixVersion UNDEFINED tags #5495 [@radarhere]
    • Removed DPI rounding from BMP, JPEG and PNG loading #5476 [@radarhere]
    • Removed WMF DPI rounding #5470 [@radarhere]
    • Remove spikes when drawing thin pieslices #5460 [@xtsm]
    • Updated default value for SAMPLESPERPIXEL TIFF tag #5452 [@radarhere]
    • HTTP link is not valid (wrong redirect) #5481 [@homm]
    • Removed TIFF DPI rounding #5446 [@radarhere]
    • Include code in WebP error #5471 [@radarhere]
    • Replaced uint16 and uint32 with uint16_t and uint32_t to resolve TIFF deprecations #5458 [@radarhere]
    • Do not alter pixels outside mask when drawing text on an image with transparency #5434 [@radarhere]
    • Reset handle when seeking backwards in TIFF #5443 [@radarhere]
    • Fix build with libraqm < 0.7.0 #5462 [@adrian-the-git]
    • Replace sys.stdout with sys.stdout.buffer when saving #5437 [@radarhere]
    • Fixed UNDEFINED TIFF tag of length 0 being changed in roundtrip #5426 [@radarhere]
    • Fixed bug when checking FreeType2 version if it is not installed #5445 [@radarhere]
    • Do not round dimensions when saving PDF #5459 [@radarhere]
    • Added ImageOps contain() #5417 [@radarhere]
    • Clarified error message #5457 [@radarhere]
    • Changed WebP default "method" value to 4 #5450 [@radarhere]
    • Switched to saving 1-bit PDFs with DCTDecode #5430 [@radarhere]
    • Use bpp from ICO header #5429 [@radarhere]
    • Corrected JPEG APP14 transform value #5408 [@radarhere]
    • Changed TIFF tag 33723 length to 1 #5425 [@radarhere]
    • Changed ImageMorph incorrect mode errors to ValueError #5414 [@radarhere]
    • Add EXIF tags specified in EXIF 2.32 #5419 [@gladiusglad]
    • Treat previous contents of first GIF frame as transparent #5391 [@radarhere]
    • Changed quantize and quantize2 to static #5374 [@radarhere]
    • For special image modes, revert default resize resampling to NEAREST #5411 [@radarhere]
    • Changed mode for TGA 16-bit palette to BGR;15 #5400 [@radarhere]
    • TGA color map entry size is only 1 byte #5396 [@radarhere]
    • JPEG2000: Support decoding subsampled RGB and YCbCr images #4996 [@nulano]
    • Stop decoding BC1 punchthrough alpha in BC2&3 #4144 [@jansol]
    • Added TransferFunction and ReferenceBlackWhite to core TIFF tags #5384 [@radarhere]
    • Use zero if GIF background color index is missing #5390 [@radarhere]
    • Fixed ensuring that GIF previous frame was loaded #5386 [@radarhere]
    • Valgrind fixes #5397 [@wiredfool]
    • Use python3 in shebang line #5395 [@radarhere]
    • Round down the radius in rounded_rectangle #5382 [@radarhere]
    • Fixed reading uncompressed RGB data from DDS #5383 [@radarhere]
    • Changed register_open calls to be consistent #5380 [@radarhere]

    Dependencies

    • Updated libimagequant to 2.15.1 #5492 [@radarhere]
    • Updated libimagequant to 2.15.0 #5479 [@radarhere]
    • Updated harfbuzz to 2.8.1 #5464 [@radarhere]
    • Updated libjpeg-turbo to 2.1.0 #5433 [@radarhere]
    • Updated libtiff to 4.3.0 #5421 [@radarhere]

    Documentation

    • Added release notes #5566 [@radarhere]
    • Add Twitter to PyPI project URLs #5563 [@hugovk]
    • Modified docstring for GaussianBlur #5539 [@kdpenner]
    • Copies of an image do not retain the format #5532 [@radarhere]
    • Fix differing background colors in right sidebar in dark mode docs #5515 [@PH-KDX]
    • Updated macOS tested Pillow versions #5521 [@radarhere]
    • Build docs with sphinx_copybutton and sphinxext.opengraph #5498 [@hugovk]
    • Updated badges for wheels #5483 [@radarhere]
    • Use python3 #5477 [@radarhere]
    • Corrected code references in docstring #5468 [@radarhere]
    • Updated tested libtiff versions #5466 [@radarhere]
    • Updated macOS tested Pillow versions #5427 [@radarhere]
    • Added info about mode when saving ICO for Windows #5423 [@radarhere]
    • Add Raspberry Pi OS to platform support #5424 [@thijstriemstra]
    • Changed wording to avoid confusion with IMAGING_TYPE_SPECIAL #5410 [@radarhere]
    • Fix PDF file format documentation #5399 [@cholojuanito]

    Testing

    • Corrected comments #5560 [@radarhere]
    • Reverse test order for two CI jobs #5542 [@radarhere]
    • Fixed errors when running tests in random order #5533 [@radarhere]
    • Fix lcms2_static target for msbuild #5522 [@kmilos]
    • Removed setuptools version requirement on GHA macOS and Windows #5496 [@radarhere]
    • Removed GitHub Actions Ubuntu setuptools version requirement #5482 [@radarhere]
    • Corrected errors in restoring sys.stdout in tests #5474 [@radarhere]
    • Revert "Fixed Python 3.10 at alpha.7": use 3.10-dev #5456 [@hugovk]
    • GHA: Update test-windows for 64-bit PyPy 7.3.4 release #5453 [@nulano]
    • Fixed Python 3.10 at alpha.7 #5447 [@radarhere]
    • Added Fedora 34 #5451 [@radarhere]
    • Updated nasm to 2.15.05 in AppVeyor #5422 [@radarhere]
    • Corrected test #5420 [@radarhere]
    • Add test for CVE-2021-25292 ReDoS #5393 [@hugovk]
    • Removed Fedora 32 docker job #5378 [@radarhere]
    Source code(tar.gz)
    Source code(zip)
  • 8.2.0(Apr 1, 2021)

    https://pillow.readthedocs.io/en/stable/releasenotes/8.2.0.html

    Changes

    • Security fixes for 8.2.0 #5377 [@hugovk]
    • Move getxmp() to JpegImageFile #5376 [@radarhere]
    • Added getxmp() method #5144 [@UrielMaD]
    • Compile LibTIFF with CMake on Windows #5359 [@nulano]
    • Add ImageShow support for GraphicsMagick #5349 [@latosha-maltba]
    • Tiff crash fixes in TiffDecode.c #5372 [@wiredfool]
    • Remove redundant check (addition to #5364) #5366 [@kkopachev]
    • Do not load transparent pixels from subsequent GIF frames #5333 [@radarhere]
    • Use LZW encoding when saving GIF images #5291 [@raygard]
    • Set all transparent colors to be equal in quantize() #5282 [@radarhere]
    • Allow PixelAccess to use Python int when parsing x and y #5206 [@radarhere]
    • Removed Image._MODEINFO #5316 [@radarhere]
    • Add preserve_tone option to autocontrast #5350 [@elejke]
    • Only import numpy when necessary #5323 [@radarhere]
    • Fixed linear_gradient and radial_gradient I and F modes #5274 [@radarhere]
    • Add support for reading TIFFs with PlanarConfiguration=2 #5364 [@wiredfool]
    • More OSS-Fuzz support #5328 [@wiredfool]
    • Do not premultiply alpha when resizing with Image.NEAREST resampling #5304 [@nulano]
    • Use quantization method attributes #5353 [@radarhere]
    • Dynamically link FriBiDi instead of Raqm #5062 [@nulano]
    • Removed build_distance_tables return value #5363 [@radarhere]
    • Allow fewer PNG palette entries than the bit depth maximum when saving #5330 [@radarhere]
    • Use duration from info dictionary when saving WebP #5338 [@radarhere]
    • Improved efficiency when creating GIF disposal images #5326 [@radarhere]
    • Stop flattening EXIF IFD into getexif() #4947 [@radarhere]
    • Replaced tiff_deflate with tiff_adobe_deflate compression when saving TIFF images #5343 [@radarhere]
    • Save ICC profile from TIFF encoderinfo #5321 [@radarhere]
    • Moved RGB fix inside ImageQt class #5268 [@radarhere]
    • Fix -Wformat error in TiffDecode #5305 [@lukegb]
    • Allow alpha_composite destination to be negative #5313 [@radarhere]
    • Ensure file is closed if it is opened by ImageQt.ImageQt #5260 [@radarhere]
    • Added ImageDraw rounded_rectangle method #5208 [@radarhere]
    • Added IPythonViewer #5289 [@radarhere]
    • Only draw each rectangle outline pixel once #5183 [@radarhere]
    • Use mmap instead of built-in Win32 mapper #5224 [@radarhere]
    • Handle PCX images with an odd stride #5214 [@radarhere]
    • Only read different sizes for "Large Thumbnail" MPO frames #5168 [@radarhere]

    Dependencies

    • Updated harfbuzz to 2.8.0 #5334 [@radarhere]

    Deprecations

    • Deprecated categories #5351 [@radarhere]

    Documentation

    • Docs: Fix link in release notes #5371 [@hugovk]
    • Corrected grammar #5332 [@radarhere]
    • Document Raqm/FriBiDi linking changes #5365 [@nulano]
    • Deprecated categories #5351 [@radarhere]
    • Document quantize method defaults and mode support #5352 [@radarhere]
    • Document prerequisites and Python development libraries for Alpine #5361 [@radarhere]
    • Listed Debian packages #5360 [@radarhere]
    • Contributing docs: Include release notes as needed or appropriate #5357 [@hugovk]
    • Updated macOS tested Pillow versions #5354 [@radarhere]
    • Added release notes for #4947 #5344 [@radarhere]
    • Updated list of TIFF compression methods #5336 [@radarhere]
    • Document #5321 #5327 [@radarhere]
    • Added link to class and function in release notes #5318 [@radarhere]
    • Document license for several fonts #5215 [@radarhere]

    Testing

    • Fix pytest valgrind warnings #5373 [@wiredfool]
    • Updated Ghostscript to 9.54.0 #5368 [@radarhere]
    • Increased use of assert_image_equal_tofile #5345 [@radarhere]
    • Added test for saving PNG with bits keyword #5331 [@radarhere]
    • Updated harfbuzz to 2.8.0 #5334 [@radarhere]
    • Add pytest-timeout to CI and requirements.txt #5329 [@wiredfool]
    • Fixed unclosed file warning #5325 [@radarhere]
    • Updated shell for mkdir commands #5219 [@radarhere]
    • Document and add tests for SBIX color font support #5155 [@nulano]
    Source code(tar.gz)
    Source code(zip)
  • 8.1.2(Mar 6, 2021)

  • 8.1.1(Mar 1, 2021)

  • 8.1.0(Jan 2, 2021)

    https://pillow.readthedocs.io/en/stable/releasenotes/8.1.0.html

    Changes

    • Fix TIFF OOB Write error #5175 [@radarhere]
    • Fix for Buffer Read Overrun in PCX Decoding #5174 [@radarhere]
    • Fix for SGI Decode buffer overrun #5173 [@radarhere]
    • Fix OOB Read when saving GIF of xsize=1 #5149 [@wiredfool]
    • Add support for PySide6 #5161 [@hugovk]
    • Moved QApplication into one test #5167 [@radarhere]
    • Use disposal settings from previous frame in APNG #5126 [@radarhere]
    • Revert "skip wheels on 3.10-dev due to wheel#354" #5163 [@radarhere]
    • Better _binary module use #5156 [@radarhere]
    • Added exception explaining that repr_png saves to PNG #5139 [@radarhere]
    • Use previous disposal method in GIF load_end #5125 [@radarhere]
    • Do not catch a ValueError only to raise another #5090 [@radarhere]
    • Allow putpalette to accept 1024 integers to include alpha values #5089 [@radarhere]
    • Fix OOB Read when writing TIFF with custom Metadata #5148 [@wiredfool]
    • Removed unused variable #5140 [@radarhere]
    • Fix dereferencing of potential null pointers #5111 [@cgohlke]
    • Fixed warnings assigning to "unsigned char *" from "char *" #5127 [@radarhere]
    • Add append_images support for ICO #4568 [@ziplantil]
    • Fixed comparison warnings #5122 [@radarhere]
    • Block TIFFTAG_SUBIFD #5120 [@radarhere]
    • Fix dereferencing potential null pointer #5108 [@cgohlke]
    • Replaced PyErr_NoMemory with ImagingError_MemoryError #5113 [@radarhere]
    • Remove duplicate code #5109 [@cgohlke]
    • Moved warning to end of execution #4965 [@radarhere]
    • Removed unused fromstring and tostring C methods #5026 [@radarhere]
    • init() if one of the formats is unrecognised #5037 [@radarhere]

    Dependencies

    • Updated libtiff to 4.2.0 #5153 [@radarhere]
    • Updated openjpeg to 2.4.0 #5151 [@radarhere]
    • Updated harfbuzz to 2.7.4 #5138 [@radarhere]
    • Updated harfbuzz to 2.7.3 #5128 [@radarhere]
    • Updated libraqm to 0.7.1 #5070 [@radarhere]
    • Updated libimagequant to 2.13.1 #5065 [@radarhere]
    • Update FriBiDi to 1.0.10 #5064 [@nulano]
    • Updated libraqm to 0.7.1 #5063 [@radarhere]
    • Updated libjpeg-turbo to 2.0.6 #5044 [@radarhere]

    Deprecations

    • Makefile updates #5159 [@wiredfool]
    • Deprecate FreeType 2.7 #5098 [@hugovk]
    • Document when deprecations will be removed #5085 [@hugovk]

    Documentation

    • Document CVE fixes #5176 [@radarhere]
    • Add #5159 to the release notes #5171 [@radarhere]
    • Added release notes for #5149 #5172 [@radarhere]
    • Document #5161 in release notes #5170 [@radarhere]
    • Updated copyright year #5166 [@radarhere]
    • Added #5148 to the release notes #5154 [@radarhere]
    • Document limited number of characters in FontFile #5137 [@radarhere]
    • OpenJPEG has been updated in pillow-wheels #5152 [@radarhere]
    • Document addition of PyPy3.7 wheels #5133 [@radarhere]
    • Added release notes for #4568 #5129 [@radarhere]
    • Updated macOS tested Pillow versions #5131 [@radarhere]
    • Added versioning documentation #5117 [@radarhere]
    • Don't add light mode bg to 3rd and 4th level menu items #5056 [@hugovk]
    • Fix use of a versus an in ImageCms.rst #5115 [@HollowMan6]
    • Update some doc code blocks to the 'pycon' lexer #5112 [@jdufresne]
    • Docs: Add 'Release notes' and 'Changelog' links to PyPI #5074 [@hugovk]
    • Document when deprecations will be removed #5085 [@hugovk]
    • Add categories to Release Drafter #5081 [@hugovk]
    • Update CHANGES.rst #5078 [@aclark4life]
    • Corrected documentation syntax #5068 [@radarhere]
    • Updated macOS tested Pillow versions #5067 [@radarhere]
    • Updated instructions now that draft releases may exist #5066 [@radarhere]
    • Add Release Drafter to draft releases #5058 [@hugovk]
    • Docs: add logo with text to menu #5055 [@hugovk]
    • Fixed link formatting #5040 [@radarhere]
    • PNG supports append_images #5031 [@radarhere]
    • Link directly to pilfont script #5030 [@radarhere]
    • Document FreeMono license #5002 [@radarhere]
    • Refer to "HPND License" instead of "PIL Software License" #5025 [@radarhere]
    • Added Fedora 33 to CI targets #5024 [@radarhere]
    • Update Travis CI links for .com #5022 [@hugovk]
    • Invoke pip using Python #5019 [@radarhere]
    • Updated CI targets #5018 [@radarhere]
    • Describe effect of WebP save_all #5016 [@radarhere]
    • Updated CI targets #5013 [@radarhere]
    • Clarified that "text" must be a string #5007 [@radarhere]
    • Releasing: Add a 'git push' to point release, adjust MD formatting #5006 [@hugovk]
    • Updated macOS tested Pillow versions #5004 [@radarhere]

    Testing

    • Corrected argument #5162 [@radarhere]
    • Releasing: Replace viewdoc with markdown2 and twine check #4983 [@hugovk]
    • Update isort URL: timothycrosley/isort → PyCQA/isort #5110 [@jdufresne]
    • Add tests for ImagePath.Path #5102 [@hugovk]
    • Remove unused Travis CI config #5107 [@hugovk]
    • Added packaging #5106 [@hugovk]
    • Move non-x86 tests to GHA #5088 [@nulano]
    • GHA: Add PyPy3.7 #5099 [@nulano]
    • Mark new test failures on non-x86 as xfail #5091 [@nulano]
    • Disable Travis CI from automerge requirements #5087 [@hugovk]
    • CI: Remove soon-EOL Amazon Linux 1 and CentOS 6 #5060 [@hugovk]
    • GHA: Install Raqm on macOS #5061 [@nulano]
    • GHA: Make windows cache depend on VS version #5057 [@nulano]
    • Add line breaks in test-windows #5052 [@nulano]
    • Remove excess Travis CI jobs #5029 [@hugovk]
    • Updated extra test images list #5027 [@radarhere]
    • GHA: Add 3.10-dev #4980 [@nulano]
    • Updated Python for diffcover and doccheck to 3.9 #5023 [@radarhere]
    • Add Fedora 33 #5021 [@hugovk]
    • Invoke pip using Python #5019 [@radarhere]
    • AppVeyor: Test on Python 3.9 final #5014 [@hugovk]
    • Travis CI: Test on Python 3.9 final #5010 [@hugovk]
    • CI: Replace test images from pillow-depends #5001 [@nulano]
    Source code(tar.gz)
    Source code(zip)
  • 8.0.1(Oct 22, 2020)

  • 8.0.0(Oct 14, 2020)

  • 7.2.0(Jun 30, 2020)

  • 7.1.2(Apr 25, 2020)

  • 7.1.1(Apr 2, 2020)

  • 7.1.0(Apr 1, 2020)

  • 7.0.0(Jan 2, 2020)

  • 6.2.2(Jan 2, 2020)

  • 6.2.1(Oct 21, 2019)

  • 6.2.0(Oct 1, 2019)

  • 6.1.0(Jul 3, 2019)

Owner
Pillow
The friendly PIL fork (Python Imaging Library)
Pillow
Django friendly finite state machine support

Django friendly finite state machine support django-fsm adds simple declarative state management for django models. If you need parallel task executio

Viewflow 2.1k Dec 31, 2022
Developer-friendly asynchrony for Django

Django Channels Channels augments Django to bring WebSocket, long-poll HTTP, task offloading and other async support to your code, using familiar Djan

Django 5.5k Dec 29, 2022
Stream Framework is a Python library, which allows you to build news feed, activity streams and notification systems using Cassandra and/or Redis. The authors of Stream-Framework also provide a cloud service for feed technology:

Stream Framework Activity Streams & Newsfeeds Stream Framework is a Python library which allows you to build activity streams & newsfeeds using Cassan

Thierry Schellenbach 4.7k Jan 2, 2023
Book search Django web project that uses requests python library and openlibrary API.

Book Search API Developer: Vladimir Vojtenko Book search Django web project that uses requests python library and openlibrary API. #requests #openlibr

null 1 Dec 8, 2021
Django application and library for importing and exporting data with admin integration.

django-import-export django-import-export is a Django application and library for importing and exporting data with included admin integration. Featur

null 2.6k Dec 26, 2022
Pipeline is an asset packaging library for Django.

Pipeline Pipeline is an asset packaging library for Django, providing both CSS and JavaScript concatenation and compression, built-in JavaScript templ

Jazzband 1.4k Jan 3, 2023
Reusable workflow library for Django

django-viewflow Viewflow is a lightweight reusable workflow library that helps to organize people collaboration business logic in django applications.

Viewflow 2.3k Jan 8, 2023
Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes

Bleach Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes. Bleach can also linkify text safely, appl

Mozilla 2.5k Dec 29, 2022
A Django Webapp performing CRUD operations on Library Database.

CRUD operations - Django Library Database A Django Webapp performing CRUD operations on Library Database. Tools & Technologies used: Django MongoDB HT

null 1 Dec 5, 2021
A Django Online Library Management Project.

Why am I doing this? I started learning ?? Django few months back, and this is a practice project from MDN Web Docs that touches the aspects of Django

null 1 Nov 13, 2021
This repository contains django library management system project.

Library Management System Django ** INSTALLATION** First of all install python on your system. Then run pip install -r requirements.txt to required se

whoisdinanath 1 Dec 26, 2022
Tweak the form field rendering in templates, not in python-level form definitions. CSS classes and HTML attributes can be altered.

django-widget-tweaks Tweak the form field rendering in templates, not in python-level form definitions. Altering CSS classes and HTML attributes is su

Jazzband 1.8k Jan 2, 2023
A django model and form field for normalised phone numbers using python-phonenumbers

django-phonenumber-field A Django library which interfaces with python-phonenumbers to validate, pretty print and convert phone numbers. python-phonen

Stefan Foulis 1.3k Dec 31, 2022
Learn Python and the Django Framework by building a e-commerce website

The Django-Ecommerce is an open-source project initiative and tutorial series built with Python and the Django Framework.

Very Academy 275 Jan 8, 2023
Build reusable components in Django without writing a single line of Python.

Build reusable components in Django without writing a single line of Python. {% #quote %} {% quote_photo src="/project-hail-mary.jpg" %} {% #quot

Mitchel Cabuloy 277 Jan 2, 2023
Sampling profiler for Python programs

py-spy: Sampling profiler for Python programs py-spy is a sampling profiler for Python programs. It lets you visualize what your Python program is spe

Ben Frederickson 9.5k Jan 1, 2023
A django model and form field for normalised phone numbers using python-phonenumbers

django-phonenumber-field A Django library which interfaces with python-phonenumbers to validate, pretty print and convert phone numbers. python-phonen

Stefan Foulis 1.3k Dec 31, 2022
Python port of Google's libphonenumber

phonenumbers Python Library This is a Python port of Google's libphonenumber library It supports Python 2.5-2.7 and Python 3.x (in the same codebase,

David Drysdale 3.1k Jan 8, 2023
The uncompromising Python code formatter

The Uncompromising Code Formatter “Any color you like.” Black is the uncompromising Python code formatter. By using it, you agree to cede control over

Python Software Foundation 30.7k Jan 3, 2023