ImageReadMode
- class torchvision.io.ImageReadMode(value)[source]
[DEPRECATED] Use TorchCodec instead.
Allow automatic conversion to RGB, RGBA, etc while decoding.
[DEPRECATED] Use TorchCodec instead.
Allow automatic conversion to RGB, RGBA, etc while decoding.
You don’t need to use this struct, you can just pass strings to all
mode parameters, e.g. mode="RGB".
The different available modes are the following.
UNCHANGED: loads the image as-is
RGB: converts to RGB
RGBA: converts to RGB with transparency (also aliased as RGB_ALPHA)
GRAY: converts to grayscale
GRAY_ALPHA: converts to grayscale with transparency