write_jpeg¶
- torchvision.io.write_jpeg(input: Tensor, filename: str, quality: int = 75)[source]¶
Takes an input tensor in CHW layout and saves it in a JPEG file.
- Parameters:
input (Tensor[channels, image_height, image_width]) – int8 image tensor of
c
channels, wherec
must be 1 or 3.filename (str or
pathlib.Path
) – Path to save the image.quality (int) – Quality of the resulting JPEG file, it must be a number between 1 and 100. Default: 75