Function openexr::flat::flat_image_io::save_flat_image_with_header [−][src]
pub fn save_flat_image_with_header<P: AsRef<Path>>(
filename: P,
header: &Header,
image: &FlatImage,
data_window_source: DataWindowSource
) -> Result<(), Error>
Expand description
Saves image
in an OpenEXR file at path filename
.
The file will be tiled if the image has more than one level, or if header
is given and contains a tile description attribute; otherwise the file will
be scan-line based.
The header in image
and the provided header are merged into the output. The channel list, level mode and level rounding mode are always taken from
imagerather than
header. If
data_window_source, is [
DataWindowSource::Image], then the data window from
imageis used, otherwise if
data_window_source is set to [
DataWindowSource::Header], then the data window in the output file is the intersection of the data window in
headerand the data window in
image`.
Errors
Error::Base
- if any error occurs