Skip to content

Instantly share code, notes, and snippets.

@drhirsch
Created September 7, 2016 18:50
Show Gist options
  • Save drhirsch/144b8ef3ef6e97ec733971a5fd98195b to your computer and use it in GitHub Desktop.
Save drhirsch/144b8ef3ef6e97ec733971a5fd98195b to your computer and use it in GitHub Desktop.
Multipage TIFF with skimage/freeimage (recommend tifffile instead)
from skimage.io._plugins import freeimage_plugin as freeimg
"""
imgs is a Numpy ndarray:
Nimg x Y x X (grayscale)
Nimg x Y x X x 3 (RGB color)
"""
freeimg.write_multipage(imgs,'myimages.tiff')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment