ImageIO.write#
- ImageIO.write(file=None, data=None, fileFormat=None, byteOrder=None, dataType=None, arrayOrder=None, shape=None, length=None, pixel=None, header=None, extended=None, casting='unsafe')#
Writes image file with specified header and data.
- Parameters:
- filestr, optional
File name.
- datandarray
Image data.
- fileFormat{‘em’, ‘mrc’, ‘raw’}, optional
The format of the file.
- byteOrder{‘<’, ‘>’}, optional
Byte order: ‘<’ for little-endian and ‘>’ for big-endian.
- dataTypestr, optional
Data type like ‘int8’, ‘int16’, etc.
- arrayOrder{‘C’, ‘F’}, optional
Array order: ‘C’ for z-axis fastest, ‘F’ for x-axis fastest.
- shapetuple, optional
Shape of the data in the format (x_dim, y_dim, z_dim).
- lengthlist or ndarray, optional
Length in each dimension in nm (used only for mrc format).
- pixelfloat, optional
Pixel size in nm (used only for mrc format if length is None).
- headerlist, optional
Image header.
- extendedstr, optional
Extended header string (only for mrc format).
- casting{‘no’, ‘equiv’, ‘safe’, ‘same_kind’, ‘unsafe’}, optional
Type of data casting that may occur.
- Returns:
- None
- Raises:
- FileTypeError
If the specified file format is not recognized.