Python Imaging Library (Fork)
Go to file
Leonid Bloch 28b818974e Allow to save tiff stacks from separate images
This is a quick solution that will allow to save tiff stacks from
separate images, e.g. from Numpy arrays.
Previously, tiff stacks could be saved only from multiframe images.
This behavior is similar to what is possible now with GIFs.

Note however, that for correct results, all the appended images should
have the same encoder{info,config} properties.

Example:

import numpy as np
from PIL import Image
a = np.ones((100,100,100), dtype=np.uint8)
imlist = []
for m in a:
    imlist.append(Image.fromarray(m))

imlist[0].save("test.tif", compression="tiff_deflate", save_all=True,
               append_images=imlist[1:])

(Should result in a 100-frame, 100x100 tiff stack.)

Signed-off-by: Leonid Bloch <leonid.bloch@esrf.fr>
2017-02-17 00:57:00 +02:00
.github Updated Issue Template [skip ci] 2016-09-22 09:02:32 +01:00
.travis Fix syntax error 2017-01-30 08:53:09 +02:00
depends Changed from pngquant to libimagequant 2017-01-14 19:54:14 +11:00
docs Added PySide to ImageQt documentation [ci skip] 2017-02-05 14:45:55 +11:00
libImaging Merge pull request #2382 from hugovk/test-effects 2017-02-06 21:58:41 +00:00
PIL Allow to save tiff stacks from separate images 2017-02-17 00:57:00 +02:00
Scripts remove end of file banner from all files 2016-07-10 14:11:28 +03:00
Tests Allow to save tiff stacks from separate images 2017-02-17 00:57:00 +02:00
Tk comments 2017-01-26 05:55:18 -08:00
winbuild Updated zlib to 1.2.11 2017-01-17 19:36:04 +11:00
_imaging.c 4.1.0.dev0 version bump 2017-01-02 04:06:48 -08:00
_imagingcms.c Preserve auxiliary channels during CMS transform. 2017-01-28 22:05:49 +02:00
_imagingft.c Removed whitespace from blank lines 2016-09-03 12:23:42 +10:00
_imagingmath.c Removed powf support for older Python versions 2016-03-28 19:06:06 +11:00
_imagingmorph.c Removed whitespace from blank lines 2016-09-03 12:23:42 +10:00
_imagingtk.c Applied patch: a91559b82c to fix issue #1902 2017-01-26 05:31:45 -08:00
_webp.c webp: better error checking when using Mux API 2015-02-23 11:10:37 +01:00
.coveragerc Don't exclude Windows code 2014-07-05 21:32:09 +03:00
.editorconfig Remove duplicate line [CI skip] 2016-09-03 12:37:47 +03:00
.gitattributes Add git attributes file for *.ppm, fixes #92 2013-03-10 08:28:15 -04:00
.gitignore Activated MPO detection. 2014-07-17 12:30:45 -04:00
.landscape.yaml Set landscape max-line-length 2015-07-21 18:23:55 +10:00
.travis.yml reenable nightly, move diffcover to non-docker 2.7 build 2017-01-20 11:35:49 -08:00
appveyor.yml 4.1.0.dev0 version bump 2017-01-02 04:06:48 -08:00
build_children.sh Fix repo name in curl 2015-01-04 21:30:50 +02:00
CHANGES.rst Update CHANGES.rst [ci skip] 2017-02-07 19:39:40 +00:00
decode.c Removed the handles_eof flag in the decoder, as there are no users of it 2016-11-14 07:47:02 -08:00
display.c Don't use int to handle type 2015-10-01 14:54:32 +01:00
encode.c Removed whitespace from blank lines 2016-09-03 12:23:42 +10:00
LICENSE Merge branch 'master' into license 2017-01-29 13:06:10 +02:00
Makefile Makefile entries for debug symbols, clean build, and highlight errors 2016-12-19 14:15:06 -08:00
MANIFEST.in Exclude .travis and contents from manifest 2017-01-30 19:51:28 +11:00
map.c Map.c check should be against PY_SSIZE_T_MAX (#2151) 2016-10-04 07:16:17 -07:00
mp_compile.py Flake8 fixes 2016-09-03 12:17:22 +10:00
outline.c py3k: Remove ancient Python hacks 2013-01-10 08:46:57 -06:00
path.c Malloc check, realloc, #1715 2016-06-08 06:21:38 -07:00
profile-installed.py Removed unused import 2016-05-10 23:10:44 +10:00
py3.h Drop support for Python 2.6 2016-11-22 04:23:55 -08:00
README.rst Renamed reference to OS X to macOS 2016-09-26 19:04:11 +10:00
RELEASING.md Renamed references to OS X to macOS 2016-09-23 21:12:03 +10:00
requirements.txt Add note about reqs [ci skip] 2016-03-23 17:23:08 -04:00
selftest.py Set executable flag on selftest.py and added shebang line 2016-12-11 12:30:11 +11:00
setup.py Merge pull request #2357 from radarhere/zlib 2017-01-19 20:51:58 +02:00
test-installed.py Add more detail to the appveyor test runs 2016-05-12 05:52:29 -07:00
tox.ini Added py36 to tox envlist 2016-12-27 02:28:11 -08:00

Pillow
======

Python Imaging Library (Fork)
-----------------------------

Pillow is the friendly PIL fork by `Alex Clark and Contributors <https://github.com/python-pillow/Pillow/graphs/contributors>`_. PIL is the Python Imaging Library by Fredrik Lundh and Contributors.

.. start-badges

.. list-table::
    :stub-columns: 1

    * - docs
      - |docs|
    * - tests
      - | |linux| |macos| |windows| |coverage| |health|
    * - package
      - |zenodo| |version| |downloads|

.. |docs| image:: https://readthedocs.org/projects/pillow/badge/?version=latest
   :target: https://pillow.readthedocs.io/?badge=latest
   :alt: Documentation Status

.. |linux| image:: https://img.shields.io/travis/python-pillow/Pillow/master.svg?label=Linux%20build
   :target: https://travis-ci.org/python-pillow/Pillow
   :alt: Travis CI build status (Linux)

.. |macos| image:: https://img.shields.io/travis/python-pillow/pillow-wheels/latest.svg?label=macOS%20build
   :target: https://travis-ci.org/python-pillow/pillow-wheels
   :alt: Travis CI build status (macOS)

.. |windows| image:: https://img.shields.io/appveyor/ci/python-pillow/Pillow/master.svg?label=Windows%20build
   :target: https://ci.appveyor.com/project/python-pillow/Pillow
   :alt: AppVeyor CI build status (Windows)

.. |coverage| image:: https://coveralls.io/repos/python-pillow/Pillow/badge.svg?branch=master&service=github
   :target: https://coveralls.io/github/python-pillow/Pillow?branch=master
   :alt: Code coverage

.. |health| image:: https://landscape.io/github/python-pillow/Pillow/master/landscape.svg
   :target: https://landscape.io/github/python-pillow/Pillow/master
   :alt: Code health

.. |zenodo| image:: https://zenodo.org/badge/17549/python-pillow/Pillow.svg
   :target: https://zenodo.org/badge/latestdoi/17549/python-pillow/Pillow

.. |version| image:: https://img.shields.io/pypi/v/pillow.svg
   :target: https://pypi.python.org/pypi/Pillow/
   :alt: Latest PyPI version

.. |downloads| image:: https://img.shields.io/pypi/dm/pillow.svg
   :target: https://pypi.python.org/pypi/Pillow/
   :alt: Number of PyPI downloads

.. end-badges



More Information
----------------

- `Documentation <https://pillow.readthedocs.io/>`_

  - `Installation <https://pillow.readthedocs.io/en/latest/installation.html>`_
  - `Handbook <https://pillow.readthedocs.io/en/latest/handbook/index.html>`_

- `Contribute <https://github.com/python-pillow/Pillow/blob/master/.github/CONTRIBUTING.md>`_

  - `Issues <https://github.com/python-pillow/Pillow/issues>`_
  - `Pull requests <https://github.com/python-pillow/Pillow/pulls>`_

- `Changelog <https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst>`_

  - `Pre-fork <https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst#pre-fork>`_