imageio.plugins.tifffile_v3.TifffilePlugin.write#
- TifffilePlugin.write(ndimage: Union[Sequence[Sequence[Sequence[Sequence[Sequence[Any]]]]], _SupportsArray[dtype], Sequence[_SupportsArray[dtype]], Sequence[Sequence[_SupportsArray[dtype]]], Sequence[Sequence[Sequence[_SupportsArray[dtype]]]], Sequence[Sequence[Sequence[Sequence[_SupportsArray[dtype]]]]], bool, int, float, complex, str, bytes, Sequence[Union[bool, int, float, complex, str, bytes]], Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]], Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]], Sequence[Sequence[Sequence[Sequence[Union[bool, int, float, complex, str, bytes]]]]]], *, is_batch: bool = False, **kwargs) Optional[bytes] [source]#
Save a ndimage as TIFF.
- Parameters:
- ndimageArrayLike
The ndimage to encode and write to the ImageResource.
- is_batchbool
If True, the first dimension of the given ndimage is treated as a batch dimension and each element will create a new series.
- kwargsAny
Additional kwargs are forwarded to TiffWriter’s
write
method.
- Returns:
- encoded_imagebytes
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 unlesscontiguous=True
is used, in which case the call to write will append to the current series.