INNER CODE UNIT · Rust

get_width

silvia-odwyer/photon · crate/src/lib.rs:179

    pub fn get_width(&self) -> u32 {
        self.width
    }

    /// Get the PhotonImage's pixels as a Vec of u8s.
    pub fn get_raw_pixels(&self) -> Vec<u8> {
        self.raw_pixels.clone()
    }

    /// Get the height of the PhotonImage.
    pub fn get_height(&self) -> u32 {
        self.height
    }

    /// Convert the PhotonImage to base64.
    pub fn get_base64(&self) -> String {
        let buffer = self.get_bytes();
        let base64 = encode(&buffer);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…