Esempio n. 1
0
  /** Method to create a collage of several pictures */
  public void createCollage() {
    Picture pic2 = new Picture("moon-surface.jpg");

    Picture picNoBlue = new Picture(pic2);
    picNoBlue.zeroBlue();

    Picture effect1 = new Picture(pic2);
    effect1.edgeDetection(10);

    Picture effect2 = new Picture(pic2);

    this.copy(effect1, 250, 600);
    this.copy(pic2, 0, 600);
    effect2.mirrorVertical();
    this.copy(effect2, 250, 0);

    this.copy(picNoBlue, 0, 0);

    this.write("collage.jpg");
  }
 /** Method to test edgeDetection */
 public static void testEdgeDetection() {
   Picture swan = new Picture("swan.jpg");
   swan.edgeDetection(10);
   swan.explore();
 }