Struct cameraunit::SerialImageBuffer
source · pub struct SerialImageBuffer<T>where
T: Primitive,{ /* private fields */ }
Expand description
Implementations§
source§impl<T> SerialImageBuffer<T>where
T: Primitive,
impl<T> SerialImageBuffer<T>where
T: Primitive,
sourcepub fn from_vec(
width: usize,
height: usize,
data: Vec<T>
) -> Result<SerialImageBuffer<T>, &'static str>
pub fn from_vec( width: usize, height: usize, data: Vec<T> ) -> Result<SerialImageBuffer<T>, &'static str>
Create a new serializable image buffer from vector data.
§Arguments
width
: Image width.height
: Image height.data
: Image data.
Note:
- If
width * height == data.len()
, the image is assumed to be a grayscale image. - If
width * height * 2 == data.len()
, the image is assumed to be a grayscale image with alpha channel, with the odd pixels being the luma channel and the even pixels being the alpha channel. - If
width * height * 3 == data.len()
, the image is assumed to be a color image, with the first pixel in the red channel, the second pixel in the green channel, and the third pixel in the blue channel and so on. - If
width * height * 4 == data.len()
, the image is assumed to be a color image with alpha channel, with the first pixel in the red channel, the second pixel in the green channel, the third pixel in the blue channel and the fourth pixel in the alpha channel and so on.
§Errors
- If
width * height == 0
. - If number of pixel elements is not in
[1..=4]
. - If the length of the channel data stored in the image is not equal to
width * height * pixel elements
. Number of pixel elements are inferred using the length of the data vector.
sourcepub fn get_metadata(&self) -> Option<ImageMetaData>
pub fn get_metadata(&self) -> Option<ImageMetaData>
Get the image metadata.
sourcepub fn set_metadata(&mut self, meta: Option<ImageMetaData>)
pub fn set_metadata(&mut self, meta: Option<ImageMetaData>)
sourcepub fn get_mut_luma(&mut self) -> Option<&mut Vec<T>>
pub fn get_mut_luma(&mut self) -> Option<&mut Vec<T>>
Get a mutable reference to the luminosity channel data.
sourcepub fn get_mut_red(&mut self) -> Option<&mut Vec<T>>
pub fn get_mut_red(&mut self) -> Option<&mut Vec<T>>
Get a mutable reference to the red channel data.
sourcepub fn get_mut_green(&mut self) -> Option<&mut Vec<T>>
pub fn get_mut_green(&mut self) -> Option<&mut Vec<T>>
Get a mutable reference to the green channel data.
sourcepub fn get_mut_blue(&mut self) -> Option<&mut Vec<T>>
pub fn get_mut_blue(&mut self) -> Option<&mut Vec<T>>
Get a mutable reference to the blue channel data.
sourcepub fn get_mut_alpha(&mut self) -> Option<&mut Vec<T>>
pub fn get_mut_alpha(&mut self) -> Option<&mut Vec<T>>
Get a mutable reference to the alpha channel data.
sourcepub fn pixel_elems(&self) -> u8
pub fn pixel_elems(&self) -> u8
Get the number of pixel elements.
sourcepub fn into_vec(self) -> Vec<T>
pub fn into_vec(self) -> Vec<T>
Consume the image buffer and return a contiguous vector.
Note:
- If the image is grayscale, the vector contains the luma channel data.
- If the image is grayscale with alpha channel, odd pixels are luminoisty and even pixels are alpha.
- If the image is RGB, the first element of the vector is red, the second element is green and the third element is blue and so on.
- If the image is RGB with alpha channel, the first element of the vector is red, the second element is green, the third element is blue and the fourth element is alpha and so on.
source§impl SerialImageBuffer<u8>
impl SerialImageBuffer<u8>
sourcepub fn new(
meta: Option<ImageMetaData>,
luma: Option<Vec<u8>>,
red: Option<Vec<u8>>,
green: Option<Vec<u8>>,
blue: Option<Vec<u8>>,
alpha: Option<Vec<u8>>,
width: usize,
height: usize
) -> Result<SerialImageBuffer<u8>, &'static str>
pub fn new( meta: Option<ImageMetaData>, luma: Option<Vec<u8>>, red: Option<Vec<u8>>, green: Option<Vec<u8>>, blue: Option<Vec<u8>>, alpha: Option<Vec<u8>>, width: usize, height: usize ) -> Result<SerialImageBuffer<u8>, &'static str>
Create a new serializable image buffer.
§Arguments
meta
: Image metadata (optional).luma
: Luminosity data for a grayscale image. Set toNone
if it is a color image.red
: Red channel data. Set toNone
if it is a grayscale image.green
: Green channel data. Set toNone
if it is a grayscale image.blue
: Blue channel data. Set toNone
if it is a grayscale image.alpha
: Alpha channel data (optional).
§Errors
- If
width * height == 0
. - If all color channels are not specified.
- If
luma
and color channels are specified at the same time. - If the length of the channel data stored in the image is not equal to
width * height
.
sourcepub fn into_luma(&self) -> SerialImageBuffer<u16>
pub fn into_luma(&self) -> SerialImageBuffer<u16>
Convert the image to grayscale, while discarding the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue
for converting RGB to grayscale (see here).
sourcepub fn into_luma_alpha(&self) -> SerialImageBuffer<u16>
pub fn into_luma_alpha(&self) -> SerialImageBuffer<u16>
Convert the image to grayscale, while preserving the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue
for converting RGB to grayscale (see here).
sourcepub fn resize(
self,
nwidth: usize,
nheight: usize,
filter: FilterType
) -> SerialImageBuffer<u8>
pub fn resize( self, nwidth: usize, nheight: usize, filter: FilterType ) -> SerialImageBuffer<u8>
Resize this image using the specified filter algorithm.
Returns a new image. The image’s aspect ratio is preserved.
The image is scaled to the maximum possible size that fits
within the bounds specified by nwidth
and nheight
.
sourcepub fn savefits(
&self,
dir_prefix: &Path,
file_prefix: &str,
progname: Option<&str>,
compress: bool,
overwrite: bool
) -> Result<PathBuf, Error>
pub fn savefits( &self, dir_prefix: &Path, file_prefix: &str, progname: Option<&str>, compress: bool, overwrite: bool ) -> Result<PathBuf, Error>
Save the image data to a FITS file.
§Arguments
dir_prefix
- The directory where the file will be saved.file_prefix
- The prefix of the file name. The file name will be of the form{file_prefix}_{timestamp}.fits
.progname
- The name of the program that generated the image.compress
- Whether to compress the FITS file.overwrite
- Whether to overwrite the file if it already exists.
§Errors
fitsio::errors::Error
with the error description.
source§impl SerialImageBuffer<u16>
impl SerialImageBuffer<u16>
sourcepub fn new(
meta: Option<ImageMetaData>,
luma: Option<Vec<u16>>,
red: Option<Vec<u16>>,
green: Option<Vec<u16>>,
blue: Option<Vec<u16>>,
alpha: Option<Vec<u16>>,
width: usize,
height: usize
) -> Result<SerialImageBuffer<u16>, &'static str>
pub fn new( meta: Option<ImageMetaData>, luma: Option<Vec<u16>>, red: Option<Vec<u16>>, green: Option<Vec<u16>>, blue: Option<Vec<u16>>, alpha: Option<Vec<u16>>, width: usize, height: usize ) -> Result<SerialImageBuffer<u16>, &'static str>
Create a new serializable image buffer.
§Arguments
meta
: Image metadata (optional).luma
: Luminosity data for a grayscale image. Set toNone
if it is a color image.red
: Red channel data. Set toNone
if it is a grayscale image.green
: Green channel data. Set toNone
if it is a grayscale image.blue
: Blue channel data. Set toNone
if it is a grayscale image.alpha
: Alpha channel data (optional).
§Errors
- If
width * height == 0
. - If all color channels are not specified.
- If
luma
and color channels are specified at the same time. - If the length of the channel data stored in the image is not equal to
width * height
.
sourcepub fn into_luma(&self) -> SerialImageBuffer<u16>
pub fn into_luma(&self) -> SerialImageBuffer<u16>
Convert the image to grayscale, while discarding the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue
for converting RGB to grayscale (see here).
sourcepub fn into_luma_alpha(&self) -> SerialImageBuffer<u16>
pub fn into_luma_alpha(&self) -> SerialImageBuffer<u16>
Convert the image to grayscale, while preserving the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue
for converting RGB to grayscale (see here).
sourcepub fn resize(
self,
nwidth: usize,
nheight: usize,
filter: FilterType
) -> SerialImageBuffer<u16>
pub fn resize( self, nwidth: usize, nheight: usize, filter: FilterType ) -> SerialImageBuffer<u16>
Resize this image using the specified filter algorithm.
Returns a new image. The image’s aspect ratio is preserved.
The image is scaled to the maximum possible size that fits
within the bounds specified by nwidth
and nheight
.
sourcepub fn savefits(
&self,
dir_prefix: &Path,
file_prefix: &str,
progname: Option<&str>,
compress: bool,
overwrite: bool
) -> Result<PathBuf, Error>
pub fn savefits( &self, dir_prefix: &Path, file_prefix: &str, progname: Option<&str>, compress: bool, overwrite: bool ) -> Result<PathBuf, Error>
Save the image data to a FITS file.
§Arguments
dir_prefix
- The directory where the file will be saved.file_prefix
- The prefix of the file name. The file name will be of the form{file_prefix}_{timestamp}.fits
.progname
- The name of the program that generated the image.compress
- Whether to compress the FITS file.overwrite
- Whether to overwrite the file if it already exists.
§Errors
fitsio::errors::Error
with the error description.
source§impl SerialImageBuffer<f32>
impl SerialImageBuffer<f32>
sourcepub fn new(
meta: Option<ImageMetaData>,
red: Vec<f32>,
green: Vec<f32>,
blue: Vec<f32>,
alpha: Option<Vec<f32>>,
width: usize,
height: usize
) -> Result<SerialImageBuffer<f32>, &'static str>
pub fn new( meta: Option<ImageMetaData>, red: Vec<f32>, green: Vec<f32>, blue: Vec<f32>, alpha: Option<Vec<f32>>, width: usize, height: usize ) -> Result<SerialImageBuffer<f32>, &'static str>
Create a new serializable image buffer.
§Arguments
meta
: Image metadata (optional).red
: Red channel data. Set toNone
if it is a grayscale image.green
: Green channel data. Set toNone
if it is a grayscale image.blue
: Blue channel data. Set toNone
if it is a grayscale image.alpha
: Alpha channel data (optional).
§Errors
- If
width * height == 0
. - If the length of the channel data stored in the image is not equal to
width * height
.
sourcepub fn into_luma(&self) -> SerialImageBuffer<u16>
pub fn into_luma(&self) -> SerialImageBuffer<u16>
Convert the image to grayscale, discarding the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue
for converting RGB to grayscale (see here).
sourcepub fn into_luma_alpha(&self) -> SerialImageBuffer<u16>
pub fn into_luma_alpha(&self) -> SerialImageBuffer<u16>
Convert the image to grayscale, while preserving the alpha channel. The transformation used is 0.2162 * red + 0.7152 * green + 0.0722 * blue
for converting RGB to grayscale (see here).
sourcepub fn resize(
self,
nwidth: usize,
nheight: usize,
filter: FilterType
) -> SerialImageBuffer<f32>
pub fn resize( self, nwidth: usize, nheight: usize, filter: FilterType ) -> SerialImageBuffer<f32>
Resize this image using the specified filter algorithm.
Returns a new image. The image’s aspect ratio is preserved.
The image is scaled to the maximum possible size that fits
within the bounds specified by nwidth
and nheight
.
sourcepub fn savefits(
&self,
dir_prefix: &Path,
file_prefix: &str,
progname: Option<&str>,
compress: bool,
overwrite: bool
) -> Result<PathBuf, Error>
pub fn savefits( &self, dir_prefix: &Path, file_prefix: &str, progname: Option<&str>, compress: bool, overwrite: bool ) -> Result<PathBuf, Error>
Save the image data to a FITS file.
§Arguments
dir_prefix
- The directory where the file will be saved.file_prefix
- The prefix of the file name. The file name will be of the form{file_prefix}_{timestamp}.fits
.progname
- The name of the program that generated the image.compress
- Whether to compress the FITS file.overwrite
- Whether to overwrite the file if it already exists.
§Errors
fitsio::errors::Error
with the error description.
Trait Implementations§
source§impl<T> Clone for SerialImageBuffer<T>
impl<T> Clone for SerialImageBuffer<T>
source§fn clone(&self) -> SerialImageBuffer<T>
fn clone(&self) -> SerialImageBuffer<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T> Debug for SerialImageBuffer<T>
impl<T> Debug for SerialImageBuffer<T>
source§impl<'de, T> Deserialize<'de> for SerialImageBuffer<T>where
T: Primitive + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for SerialImageBuffer<T>where
T: Primitive + Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<SerialImageBuffer<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<SerialImageBuffer<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl<T> From<&ImageBuffer<Luma<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
impl<T> From<&ImageBuffer<Luma<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
source§fn from(img: &ImageBuffer<Luma<T>, Vec<T>>) -> SerialImageBuffer<T>
fn from(img: &ImageBuffer<Luma<T>, Vec<T>>) -> SerialImageBuffer<T>
source§impl<T> From<&ImageBuffer<LumaA<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
impl<T> From<&ImageBuffer<LumaA<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
source§fn from(img: &ImageBuffer<LumaA<T>, Vec<T>>) -> SerialImageBuffer<T>
fn from(img: &ImageBuffer<LumaA<T>, Vec<T>>) -> SerialImageBuffer<T>
source§impl From<&ImageBuffer<Rgb<f32>, Vec<f32>>> for SerialImageBuffer<f32>
impl From<&ImageBuffer<Rgb<f32>, Vec<f32>>> for SerialImageBuffer<f32>
source§fn from(img: &ImageBuffer<Rgb<f32>, Vec<f32>>) -> SerialImageBuffer<f32>
fn from(img: &ImageBuffer<Rgb<f32>, Vec<f32>>) -> SerialImageBuffer<f32>
source§impl From<&ImageBuffer<Rgb<u16>, Vec<u16>>> for SerialImageBuffer<u16>
impl From<&ImageBuffer<Rgb<u16>, Vec<u16>>> for SerialImageBuffer<u16>
source§fn from(img: &ImageBuffer<Rgb<u16>, Vec<u16>>) -> SerialImageBuffer<u16>
fn from(img: &ImageBuffer<Rgb<u16>, Vec<u16>>) -> SerialImageBuffer<u16>
source§impl From<&ImageBuffer<Rgb<u8>, Vec<u8>>> for SerialImageBuffer<u8>
impl From<&ImageBuffer<Rgb<u8>, Vec<u8>>> for SerialImageBuffer<u8>
source§fn from(img: &ImageBuffer<Rgb<u8>, Vec<u8>>) -> SerialImageBuffer<u8>
fn from(img: &ImageBuffer<Rgb<u8>, Vec<u8>>) -> SerialImageBuffer<u8>
source§impl From<&SerialImageBuffer<f32>> for DynamicSerialImage
impl From<&SerialImageBuffer<f32>> for DynamicSerialImage
source§fn from(value: &SerialImageBuffer<f32>) -> DynamicSerialImage
fn from(value: &SerialImageBuffer<f32>) -> DynamicSerialImage
source§impl From<&SerialImageBuffer<u16>> for DynamicSerialImage
impl From<&SerialImageBuffer<u16>> for DynamicSerialImage
source§fn from(value: &SerialImageBuffer<u16>) -> DynamicSerialImage
fn from(value: &SerialImageBuffer<u16>) -> DynamicSerialImage
source§impl From<&SerialImageBuffer<u8>> for DynamicSerialImage
impl From<&SerialImageBuffer<u8>> for DynamicSerialImage
source§fn from(value: &SerialImageBuffer<u8>) -> DynamicSerialImage
fn from(value: &SerialImageBuffer<u8>) -> DynamicSerialImage
source§impl<T> From<ImageBuffer<Luma<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
impl<T> From<ImageBuffer<Luma<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
source§fn from(img: ImageBuffer<Luma<T>, Vec<T>>) -> SerialImageBuffer<T>
fn from(img: ImageBuffer<Luma<T>, Vec<T>>) -> SerialImageBuffer<T>
source§impl<T> From<ImageBuffer<LumaA<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
impl<T> From<ImageBuffer<LumaA<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
source§fn from(img: ImageBuffer<LumaA<T>, Vec<T>>) -> SerialImageBuffer<T>
fn from(img: ImageBuffer<LumaA<T>, Vec<T>>) -> SerialImageBuffer<T>
source§impl From<ImageBuffer<Rgb<f32>, Vec<f32>>> for SerialImageBuffer<f32>
impl From<ImageBuffer<Rgb<f32>, Vec<f32>>> for SerialImageBuffer<f32>
source§fn from(img: ImageBuffer<Rgb<f32>, Vec<f32>>) -> SerialImageBuffer<f32>
fn from(img: ImageBuffer<Rgb<f32>, Vec<f32>>) -> SerialImageBuffer<f32>
source§impl From<ImageBuffer<Rgb<u16>, Vec<u16>>> for SerialImageBuffer<u16>
impl From<ImageBuffer<Rgb<u16>, Vec<u16>>> for SerialImageBuffer<u16>
source§fn from(img: ImageBuffer<Rgb<u16>, Vec<u16>>) -> SerialImageBuffer<u16>
fn from(img: ImageBuffer<Rgb<u16>, Vec<u16>>) -> SerialImageBuffer<u16>
source§impl From<ImageBuffer<Rgb<u8>, Vec<u8>>> for SerialImageBuffer<u8>
impl From<ImageBuffer<Rgb<u8>, Vec<u8>>> for SerialImageBuffer<u8>
source§fn from(img: ImageBuffer<Rgb<u8>, Vec<u8>>) -> SerialImageBuffer<u8>
fn from(img: ImageBuffer<Rgb<u8>, Vec<u8>>) -> SerialImageBuffer<u8>
source§impl From<SerialImageBuffer<f32>> for DynamicSerialImage
impl From<SerialImageBuffer<f32>> for DynamicSerialImage
source§fn from(value: SerialImageBuffer<f32>) -> DynamicSerialImage
fn from(value: SerialImageBuffer<f32>) -> DynamicSerialImage
source§impl From<SerialImageBuffer<u16>> for DynamicSerialImage
impl From<SerialImageBuffer<u16>> for DynamicSerialImage
source§fn from(value: SerialImageBuffer<u16>) -> DynamicSerialImage
fn from(value: SerialImageBuffer<u16>) -> DynamicSerialImage
source§impl From<SerialImageBuffer<u8>> for DynamicSerialImage
impl From<SerialImageBuffer<u8>> for DynamicSerialImage
source§fn from(value: SerialImageBuffer<u8>) -> DynamicSerialImage
fn from(value: SerialImageBuffer<u8>) -> DynamicSerialImage
source§impl Into<DynamicImage> for &SerialImageBuffer<f32>
impl Into<DynamicImage> for &SerialImageBuffer<f32>
source§fn into(self) -> DynamicImage
fn into(self) -> DynamicImage
source§impl Into<DynamicImage> for &SerialImageBuffer<u16>
impl Into<DynamicImage> for &SerialImageBuffer<u16>
source§fn into(self) -> DynamicImage
fn into(self) -> DynamicImage
source§impl Into<DynamicImage> for &SerialImageBuffer<u8>
impl Into<DynamicImage> for &SerialImageBuffer<u8>
source§fn into(self) -> DynamicImage
fn into(self) -> DynamicImage
source§impl Into<DynamicImage> for SerialImageBuffer<f32>
impl Into<DynamicImage> for SerialImageBuffer<f32>
source§fn into(self) -> DynamicImage
fn into(self) -> DynamicImage
source§impl Into<DynamicImage> for SerialImageBuffer<u16>
impl Into<DynamicImage> for SerialImageBuffer<u16>
source§fn into(self) -> DynamicImage
fn into(self) -> DynamicImage
source§impl Into<DynamicImage> for SerialImageBuffer<u8>
impl Into<DynamicImage> for SerialImageBuffer<u8>
source§fn into(self) -> DynamicImage
fn into(self) -> DynamicImage
source§impl<T> PartialEq for SerialImageBuffer<T>
impl<T> PartialEq for SerialImageBuffer<T>
source§fn eq(&self, other: &SerialImageBuffer<T>) -> bool
fn eq(&self, other: &SerialImageBuffer<T>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<T> Serialize for SerialImageBuffer<T>
impl<T> Serialize for SerialImageBuffer<T>
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl TryFrom<&DynamicImage> for SerialImageBuffer<f32>
impl TryFrom<&DynamicImage> for SerialImageBuffer<f32>
source§fn try_from(
image: &DynamicImage
) -> Result<SerialImageBuffer<f32>, <SerialImageBuffer<f32> as TryFrom<&DynamicImage>>::Error>
fn try_from( image: &DynamicImage ) -> Result<SerialImageBuffer<f32>, <SerialImageBuffer<f32> as TryFrom<&DynamicImage>>::Error>
source§impl TryFrom<&DynamicImage> for SerialImageBuffer<u16>
impl TryFrom<&DynamicImage> for SerialImageBuffer<u16>
source§fn try_from(
image: &DynamicImage
) -> Result<SerialImageBuffer<u16>, <SerialImageBuffer<u16> as TryFrom<&DynamicImage>>::Error>
fn try_from( image: &DynamicImage ) -> Result<SerialImageBuffer<u16>, <SerialImageBuffer<u16> as TryFrom<&DynamicImage>>::Error>
source§impl TryFrom<&DynamicImage> for SerialImageBuffer<u8>
impl TryFrom<&DynamicImage> for SerialImageBuffer<u8>
source§fn try_from(
image: &DynamicImage
) -> Result<SerialImageBuffer<u8>, <SerialImageBuffer<u8> as TryFrom<&DynamicImage>>::Error>
fn try_from( image: &DynamicImage ) -> Result<SerialImageBuffer<u8>, <SerialImageBuffer<u8> as TryFrom<&DynamicImage>>::Error>
source§impl TryFrom<DynamicImage> for SerialImageBuffer<f32>
impl TryFrom<DynamicImage> for SerialImageBuffer<f32>
source§fn try_from(
image: DynamicImage
) -> Result<SerialImageBuffer<f32>, <SerialImageBuffer<f32> as TryFrom<DynamicImage>>::Error>
fn try_from( image: DynamicImage ) -> Result<SerialImageBuffer<f32>, <SerialImageBuffer<f32> as TryFrom<DynamicImage>>::Error>
source§impl TryFrom<DynamicImage> for SerialImageBuffer<u16>
impl TryFrom<DynamicImage> for SerialImageBuffer<u16>
source§fn try_from(
image: DynamicImage
) -> Result<SerialImageBuffer<u16>, <SerialImageBuffer<u16> as TryFrom<DynamicImage>>::Error>
fn try_from( image: DynamicImage ) -> Result<SerialImageBuffer<u16>, <SerialImageBuffer<u16> as TryFrom<DynamicImage>>::Error>
source§impl TryFrom<DynamicImage> for SerialImageBuffer<u8>
impl TryFrom<DynamicImage> for SerialImageBuffer<u8>
source§fn try_from(
image: DynamicImage
) -> Result<SerialImageBuffer<u8>, <SerialImageBuffer<u8> as TryFrom<DynamicImage>>::Error>
fn try_from( image: DynamicImage ) -> Result<SerialImageBuffer<u8>, <SerialImageBuffer<u8> as TryFrom<DynamicImage>>::Error>
source§impl<T> TryInto<ImageBuffer<Luma<T>, Vec<T>>> for &SerialImageBuffer<T>where
T: Primitive,
impl<T> TryInto<ImageBuffer<Luma<T>, Vec<T>>> for &SerialImageBuffer<T>where
T: Primitive,
source§impl<T> TryInto<ImageBuffer<Luma<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
impl<T> TryInto<ImageBuffer<Luma<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
source§impl<T> TryInto<ImageBuffer<LumaA<T>, Vec<T>>> for &SerialImageBuffer<T>where
T: Primitive,
impl<T> TryInto<ImageBuffer<LumaA<T>, Vec<T>>> for &SerialImageBuffer<T>where
T: Primitive,
source§impl<T> TryInto<ImageBuffer<LumaA<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
impl<T> TryInto<ImageBuffer<LumaA<T>, Vec<T>>> for SerialImageBuffer<T>where
T: Primitive,
source§impl TryInto<ImageBuffer<Rgb<f32>, Vec<f32>>> for &SerialImageBuffer<f32>
impl TryInto<ImageBuffer<Rgb<f32>, Vec<f32>>> for &SerialImageBuffer<f32>
source§impl TryInto<ImageBuffer<Rgb<f32>, Vec<f32>>> for SerialImageBuffer<f32>
impl TryInto<ImageBuffer<Rgb<f32>, Vec<f32>>> for SerialImageBuffer<f32>
source§impl TryInto<ImageBuffer<Rgb<u16>, Vec<u16>>> for &SerialImageBuffer<u16>
impl TryInto<ImageBuffer<Rgb<u16>, Vec<u16>>> for &SerialImageBuffer<u16>
source§impl TryInto<ImageBuffer<Rgb<u16>, Vec<u16>>> for SerialImageBuffer<u16>
impl TryInto<ImageBuffer<Rgb<u16>, Vec<u16>>> for SerialImageBuffer<u16>
source§impl TryInto<ImageBuffer<Rgb<u8>, Vec<u8>>> for &SerialImageBuffer<u8>
impl TryInto<ImageBuffer<Rgb<u8>, Vec<u8>>> for &SerialImageBuffer<u8>
source§impl TryInto<ImageBuffer<Rgb<u8>, Vec<u8>>> for SerialImageBuffer<u8>
impl TryInto<ImageBuffer<Rgb<u8>, Vec<u8>>> for SerialImageBuffer<u8>
source§impl TryInto<SerialImageBuffer<f32>> for &DynamicSerialImage
impl TryInto<SerialImageBuffer<f32>> for &DynamicSerialImage
source§impl TryInto<SerialImageBuffer<f32>> for DynamicSerialImage
impl TryInto<SerialImageBuffer<f32>> for DynamicSerialImage
source§impl TryInto<SerialImageBuffer<u16>> for &DynamicSerialImage
impl TryInto<SerialImageBuffer<u16>> for &DynamicSerialImage
source§impl TryInto<SerialImageBuffer<u16>> for DynamicSerialImage
impl TryInto<SerialImageBuffer<u16>> for DynamicSerialImage
source§impl TryInto<SerialImageBuffer<u8>> for &DynamicSerialImage
impl TryInto<SerialImageBuffer<u8>> for &DynamicSerialImage
source§impl TryInto<SerialImageBuffer<u8>> for DynamicSerialImage
impl TryInto<SerialImageBuffer<u8>> for DynamicSerialImage
impl<T> StructuralPartialEq for SerialImageBuffer<T>where
T: Primitive,
Auto Trait Implementations§
impl<T> Freeze for SerialImageBuffer<T>
impl<T> RefUnwindSafe for SerialImageBuffer<T>where
T: RefUnwindSafe,
impl<T> Send for SerialImageBuffer<T>where
T: Send,
impl<T> Sync for SerialImageBuffer<T>where
T: Sync,
impl<T> Unpin for SerialImageBuffer<T>where
T: Unpin,
impl<T> UnwindSafe for SerialImageBuffer<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more