日期:2014-05-17 浏览次数:21196 次
public Bitmap Join(params Bitmap[] bmp)
{
int width = bmp.OrderBy(d => d.Width).Last().Width;
int height = 0;
foreach (var item in bmp)
{
height += item.Height;
}
Bitmap res = new Bitmap(width, height);
int now = 0;
foreach (var item in bmp)
{
for (int i = 0; i < item.Width; i++)
{
for (int k = 0; k < item.Height; k++)
{
res.SetPixel(i, k + now, item.GetPixel(i, k));
}
}
now += item.Height;
}
return res;
}
Bitmap XXXX(Bitmap b1,Bitmap b2)
{
Bitmap newBitmap=new Bitmap(Math.Max(b1.Width,b2.Width),b1.Height+b2.Height);