import java.awt.Color;


public class ChromakeyExample {
  
  public static void main (String [] args) {

    String myBackground = FileChooser.pickAFile();
    
    Picture p = new Picture(myBackground);
  
    
    Picture sprite = new Picture("bird1.jpg");
    
    Color c = new Color(0,0,255);
    
    int threshold =125;
      
    int bgWidth = p.getWidth();
    
    int x = (int) ( Math.random() * bgWidth) ;
    int y = (int) ( Math.random() * p.getHeight() );
    
    // System.out.println(" x,y is:" +x + "," + y );
     
    sprite.chromakey(p, c, threshold, x,y );
    
    p.show();
    
   
    
    
    
    


  } // end main
  
  
}