Skip to content

Instantly share code, notes, and snippets.

@taka2
Created December 7, 2009 09:10
Show Gist options
  • Select an option

  • Save taka2/250727 to your computer and use it in GitHub Desktop.

Select an option

Save taka2/250727 to your computer and use it in GitHub Desktop.
using System;
using System.Drawing;
public class CSharpTest
{
static void Main(string[] args)
{
Bitmap b = new Bitmap("a.jpg");
Bitmap newImage = new Bitmap(b.Width, b.Height * 2, Graphics.FromImage(b));
Graphics g = Graphics.FromImage(newImage);
g.DrawImage(b, 0, 0);
g.DrawImage(b, 0, b.Height);
newImage.Save("hoge.jpg");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment