fn copy_selection(&self, x: i32,y: i32,w: u32, h: u32) -> orbimage::Image {

        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);
            }
        }
        //println!("buffer {:?}",&vec);
        orbimage::Image::from_data(w ,h ,vec.into_boxed_slice()).unwrap()
    }
///crop new image from current image (copy) tranforming pure white into transparent
crop new image from current image (copy) tranforming pure white into transparent
crop new image from current image ( copy ) tranforming pure white into transparent
fn copy_selection(&self, x: i32,y: i32,w: u32, h: u32) -> orbimage::Image {
        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);
            }
        }
        //println!("buffer {:?}",&vec);
        orbimage::Image::from_data(w ,h ,vec.into_boxed_slice()).unwrap()
    }
fn copy_selection ( & self , x : i32 , y : i32 , w : u32 , h : u32 ) -> orbimage :: Image { 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 ) ; } } //println!("buffer {:?}",&vec); orbimage :: Image :: from_data ( w , h , vec . into_boxed_slice ( ) ) . unwrap ( ) }
crop new image from current image (copy) tranforming pure white into transparent
crop new image from current image ( copy ) tranforming pure white into transparent
&self
x
i32
y
i32
w
u32
h
u32
&self
x
i32
y
i32
w
u32
h
u32