Skip to main content
`Ctrl`+`K`

# imageio.plugins.tifffile_v3.TifffilePlugin.write

TifffilePlugin.write(ndimage: Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], *, is_batch: bool = False, **kwargs) → bytes | None

  Save a ndimage as TIFF.

  Parameters:
    ndimage ArrayLike

      The ndimage to encode and write to the ImageResource.

    is_batch bool

      If True, the first dimension of the given ndimage is treated as a batch dimension and each element will create a new series.

    kwargs Any

      Additional kwargs are forwarded to TiffWriter’s `write` method.

  Returns:
    encoded_image bytes

      If the ImageResource is `"<bytes>"`, return the encoded bytes. Otherwise write returns None.

  Notes

  Incremental writing is supported. Subsequent calls to `write` will create new series unless `contiguous=True` is used, in which case the call to write will append to the current series.