Enum opencv::imgcodecs::ImreadModes
source · #[repr(C)]pub enum ImreadModes {
Show 13 variants
IMREAD_UNCHANGED = -1,
IMREAD_GRAYSCALE = 0,
IMREAD_COLOR = 1,
IMREAD_ANYDEPTH = 2,
IMREAD_ANYCOLOR = 4,
IMREAD_LOAD_GDAL = 8,
IMREAD_REDUCED_GRAYSCALE_2 = 16,
IMREAD_REDUCED_COLOR_2 = 17,
IMREAD_REDUCED_GRAYSCALE_4 = 32,
IMREAD_REDUCED_COLOR_4 = 33,
IMREAD_REDUCED_GRAYSCALE_8 = 64,
IMREAD_REDUCED_COLOR_8 = 65,
IMREAD_IGNORE_ORIENTATION = 128,
}
Expand description
Imread flags
Variants§
IMREAD_UNCHANGED = -1
If set, return the loaded image as is (with alpha channel, otherwise it gets cropped). Ignore EXIF orientation.
IMREAD_GRAYSCALE = 0
If set, always convert image to the single channel grayscale image (codec internal conversion).
IMREAD_COLOR = 1
If set, always convert image to the 3 channel BGR color image.
IMREAD_ANYDEPTH = 2
If set, return 16-bit/32-bit image when the input has the corresponding depth, otherwise convert it to 8-bit.
IMREAD_ANYCOLOR = 4
If set, the image is read in any possible color format.
IMREAD_LOAD_GDAL = 8
If set, use the gdal driver for loading the image.
IMREAD_REDUCED_GRAYSCALE_2 = 16
If set, always convert image to the single channel grayscale image and the image size reduced 1/2.
IMREAD_REDUCED_COLOR_2 = 17
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/2.
IMREAD_REDUCED_GRAYSCALE_4 = 32
If set, always convert image to the single channel grayscale image and the image size reduced 1/4.
IMREAD_REDUCED_COLOR_4 = 33
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/4.
IMREAD_REDUCED_GRAYSCALE_8 = 64
If set, always convert image to the single channel grayscale image and the image size reduced 1/8.
IMREAD_REDUCED_COLOR_8 = 65
If set, always convert image to the 3 channel BGR color image and the image size reduced 1/8.
IMREAD_IGNORE_ORIENTATION = 128
If set, do not rotate the image according to EXIF’s orientation flag.
Trait Implementations§
source§impl Clone for ImreadModes
impl Clone for ImreadModes
source§fn clone(&self) -> ImreadModes
fn clone(&self) -> ImreadModes
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ImreadModes
impl Debug for ImreadModes
source§impl From<ImreadModes> for i32
impl From<ImreadModes> for i32
source§fn from(v: ImreadModes) -> Self
fn from(v: ImreadModes) -> Self
source§impl PartialEq for ImreadModes
impl PartialEq for ImreadModes
source§fn eq(&self, other: &ImreadModes) -> bool
fn eq(&self, other: &ImreadModes) -> bool
self
and other
values to be equal, and is used
by ==
.