pub fn capture_image_raw(&mut self) {
        let rect = self.bound.rect();
        unsafe {
            // transfer pixel data from screen
            BitBlt(
                self.hdc_mem,
                0,
                0,
                rect.2 as i32,
                rect.3 as i32,
                self.hdc_src,
                rect.0 as i32,
                rect.1 as i32,
                SRCCOPY,
            );

            // copy it to memory
            GetDIBits(
                self.hdc_mem,
                HBITMAP(self.bitmap.0),
                0,
                self.bitmap_info.bmHeight as u32,
                self.raw_data_bgra.as_mut_ptr() as *mut c_void,
                &mut self.bi as *mut _ as *mut BITMAPINFO,
                DIB_RGB_COLORS,
            );

            for chunck in self.raw_data_bgra.chunks_mut(4) {
                // convert bgra to rgba
                let z = chunck[0];
                chunck[0] = chunck[2];
                chunck[2] = z;
            }
        }
    }
///
/// Capture the specified region of screen to data buffer
Capture the specified region of screen to data buffer
Capture the specified region of screen to data buffer
pub fn capture_image_raw(&mut self) {
        let rect = self.bound.rect();
        unsafe {
            // transfer pixel data from screen
            BitBlt(
                self.hdc_mem,
                0,
                0,
                rect.2 as i32,
                rect.3 as i32,
                self.hdc_src,
                rect.0 as i32,
                rect.1 as i32,
                SRCCOPY,
            );
            // copy it to memory
            GetDIBits(
                self.hdc_mem,
                HBITMAP(self.bitmap.0),
                0,
                self.bitmap_info.bmHeight as u32,
                self.raw_data_bgra.as_mut_ptr() as *mut c_void,
                &mut self.bi as *mut _ as *mut BITMAPINFO,
                DIB_RGB_COLORS,
            );
            for chunck in self.raw_data_bgra.chunks_mut(4) {
                // convert bgra to rgba
                let z = chunck[0];
                chunck[0] = chunck[2];
                chunck[2] = z;
            }
        }
    }
pub fn capture_image_raw ( & mut self ) { let rect = self . bound . rect ( ) ; unsafe { // transfer pixel data from screen BitBlt ( self . hdc_mem , 0 , 0 , rect . 2 as i32 , rect . 3 as i32 , self . hdc_src , rect . 0 as i32 , rect . 1 as i32 , SRCCOPY , ) ; // copy it to memory GetDIBits ( self . hdc_mem , HBITMAP ( self . bitmap . 0 ) , 0 , self . bitmap_info . bmHeight as u32 , self . raw_data_bgra . as_mut_ptr ( ) as * mut c_void , & mut self . bi as * mut _ as * mut BITMAPINFO , DIB_RGB_COLORS , ) ; for chunck in self . raw_data_bgra . chunks_mut ( 4 ) { // convert bgra to rgba let z = chunck [ 0 ] ; chunck [ 0 ] = chunck [ 2 ] ; chunck [ 2 ] = z ; } } }
Capture the specified region of screen to data buffer
Capture the specified region of screen to data buffer
&mut self
&mut self