daily pastebin goal
31%
SHARE
TWEET

Untitled

a guest Jun 21st, 2018 48 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. import java.io.File;
  2. import picClass.FileMgr;
  3. import picClass.Picture;
  4. public class PictureTest
  5. {
  6.   public static void main(String[] args)
  7.   {
  8.     System.out.println("select a folder containing element images");
  9.     String path = FileMgr.selectDirectoryName();
  10.     File directory = new File(path);
  11.     File[] files = directory.listFiles();
  12.     Picture[] pics = new Picture[files.length];
  13.     int i = 0;
  14.     for (File f : files)
  15.     {
  16.       if (f.getPath().endsWith("png") || f.getPath().endsWith("gif") || f.getPath().endsWith("jpg"))
  17.       {
  18.       pics[i] = new Picture(f.getPath());
  19.       i++;
  20.       }
  21.     }
  22.     System.out.println("select a main image to be mosaiced");
  23.     Picture main1 = new Picture(FileMgr.selectExistingFilename());
  24.     Picture mosaic1 = WTPhotoOtto.mosaic(main1, pics, 100);
  25.   }
  26. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top