Struct ScreenshotImage
#[non_exhaustive]pub struct ScreenshotImage {
pub width: u32,
pub height: u32,
pub rgba: Vec<u8>,
}Expand description
The in-memory F2 frame (ScreenshotEvent.getImage), before either file is written.
RGBA8, top to bottom: rgba.len() is width * height * 4. Change the pixels, or
replace the whole image, and the normal PNG is what remains. A length other than
width * height * 4 writes nothing and reports screenshot failure. The HDR copy
is not this image.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.width: u32Width in pixels.
height: u32Height in pixels.
rgba: Vec<u8>Row-major RGBA8.
Implementations§
§impl ScreenshotImage
impl ScreenshotImage
Trait Implementations§
§impl Clone for ScreenshotImage
impl Clone for ScreenshotImage
§fn clone(&self) -> ScreenshotImage
fn clone(&self) -> ScreenshotImage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ScreenshotImage
impl Debug for ScreenshotImage
impl Eq for ScreenshotImage
§impl PartialEq for ScreenshotImage
impl PartialEq for ScreenshotImage
impl StructuralPartialEq for ScreenshotImage
Auto Trait Implementations§
impl Freeze for ScreenshotImage
impl RefUnwindSafe for ScreenshotImage
impl Send for ScreenshotImage
impl Sync for ScreenshotImage
impl Unpin for ScreenshotImage
impl UnsafeUnpin for ScreenshotImage
impl UnwindSafe for ScreenshotImage
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
Mutably borrows from an owned value. Read more