Guest User

Untitled

a guest
Jan 17th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1.  static void Main(string[] args)
  2.         {
  3.             string[] filePaths = Directory.GetFiles(@"~path~", "*.jpg");
  4.             Bitmap Final = new Bitmap(32*32, 32*32);
  5.             int index = 0;
  6.             for (int x = 0; x < 32; x++)
  7.             {
  8.                 for (int y = 0; y < 32; y++)
  9.                 {
  10.                     using (Graphics g = Graphics.FromImage(Final))
  11.                     {
  12.                         Image newImage = Image.FromFile(filePaths[index]);
  13.                         g.DrawImage(newImage, x * 32, y * 32);
  14.                         newImage.Dispose();
  15.                         g.Dispose();
  16.                     }
  17.                     //Final = grfx;
  18.                     index++;
  19.                 }
  20.             }
  21.             Final.Save(@"~path~.png");
  22.         }
Add Comment
Please, Sign In to add comment