decode_webpΒΆ
- torchvision.io.decode_webp(input: Tensor, mode: ImageReadMode = ImageReadMode.UNCHANGED) Tensor [source]ΒΆ
Decode a WEBP image into a 3 dimensional RGB[A] Tensor.
The values of the output tensor are uint8 between 0 and 255.
- Parameters:
input (Tensor[1]) β a one dimensional contiguous uint8 tensor containing the raw bytes of the WEBP image.
mode (str or ImageReadMode) β The mode to convert the image to, e.g. βRGBβ. Default is βUNCHANGEDβ. See
ImageReadMode
for available modes.
- Returns:
Decoded image (Tensor[image_channels, image_height, image_width])