如何用C#做图片合成!跪求!急!

来源:百度知道 编辑:UC知道 时间:2024/05/31 04:44:42
原来我是用VB6中的paintpicture做的,那玩意当年可以进行位图的位运算,但的现在的.NET里那玩意不能鸟!!!!!!!!而且现在我正在研究C#,不知道怎么做了!~~~
急!急得跪求!~~~~
图片的后缀是.bmp
如果有用vb.net做的也可以,但别象三楼那位,给了段程序但一点说明也没!!

//添加水印效果
//
public void AddWatermarkImage(Graphics picture,//要添加水印的图片
string waterMarkPicPath, //水印图片物理路径
string waterMarkPosition,//添加位置 左上 右上 左下 右下
int width, int height) //水印大小
{
try
{
Image image = new Bitmap(waterMarkPicPath);
ImageAttributes imageAttr = new ImageAttributes();
ColorMap map = new ColorMap();
map.OldColor = Color.FromArgb(0xff, 0, 0xff, 0);
map.NewColor = Color.FromArgb(0, 0, 0, 0);
ColorMap[] mapArray = new ColorMap[] { map };
imageAttr.SetRemapTable(mapArray, ColorAdjustType.Bitmap);
float[][] numArray2 = new float[5][];
float[] numArray3 = new float[5];
numArray3[0] = 1f;
numArray2[0] = numArray3;
float[] numArray4 = new float[5];
numArray4[1] = 1f;
numArray2[1]