pub fn copy_selection(&self, x: i32,y: i32,w: u32, h: u32) {

        let mut vec = vec![];
        let mut col : Color;
        
        for y1 in y..y+h as i32 {
            for x1 in x..x+w as i32 {
                col=self.pixcol(x1,y1);
                if col.r()==255 && col.g()==255 && col.b()==255 {
                    col = Color::rgba(0,0,0,0);
                }
                vec.push(col);
            }
        }
        *self.copy_buffer.borrow_mut() = orbimage::Image::from_data(w ,h ,vec.into_boxed_slice()).unwrap();
    }
///crop new image from current image (copy) tranforming pure white into transparent with mask support
crop new image from current image (copy) tranforming pure white into transparent with mask support
crop new image from current image ( copy ) tranforming pure white into transparent with mask support
pub fn copy_selection(&self, x: i32,y: i32,w: u32, h: u32) {
        let mut vec = vec![];
        let mut col : Color;
        for y1 in y..y+h as i32 {
            for x1 in x..x+w as i32 {
                col=self.pixcol(x1,y1);
                if col.r()==255 && col.g()==255 && col.b()==255 {
                    col = Color::rgba(0,0,0,0);
                }
                vec.push(col);
            }
        }
        *self.copy_buffer.borrow_mut() = orbimage::Image::from_data(w ,h ,vec.into_boxed_slice()).unwrap();
    }
pub fn copy_selection ( & self , x : i32 , y : i32 , w : u32 , h : u32 ) { let mut vec = vec ! [ ] ; let mut col : Color ; for y1 in y .. y + h as i32 { for x1 in x .. x + w as i32 { col = self . pixcol ( x1 , y1 ) ; if col . r ( ) == 255 && col . g ( ) == 255 && col . b ( ) == 255 { col = Color :: rgba ( 0 , 0 , 0 , 0 ) ; } vec . push ( col ) ; } } * self . copy_buffer . borrow_mut ( ) = orbimage :: Image :: from_data ( w , h , vec . into_boxed_slice ( ) ) . unwrap ( ) ; }
crop new image from current image (copy) tranforming pure white into transparent with mask support
crop new image from current image ( copy ) tranforming pure white into transparent with mask support
&self
x
i32
y
i32
w
u32
h
u32
&self
x
i32
y
i32
w
u32
h
u32