ermark.DrawImage(imgWatermark,
new Rectangle(xPosOfWm,yPosOfWm,wmWidth,wmHeight), //Set the detination Position
0, // x-coordinate of the portion of the source image to draw.
0, // y-coordinate of the portion of the source image to draw.
wmWidth, // Watermark Width
wmHeight, // Watermark Height
GraphicsUnit.Pixel, // Unit of measurment
imageAttributes); //ImageAttributes Object
//Replace the original photgraphs bitmap with the new Bitmap
imgPhoto = bmWatermark;
grPhoto.Dispose();
grWatermark.Dispose();
//save new image to file system.
imgPhoto.Save(WorkingDirectory + ImageName +"_finally.jpg", ImageFormat.Jpeg);
imgPhoto.Dispose();
imgWatermark.Dispose();
}
}
//水印图片加水印文字
// ReDrawImg img = new ReDrawImg();
// img .PublicWorkingDirectory = @"C:\Watermark_src\WaterPic\";
// img .PublicImageName = "watermark_photo.jpg";
// img .PublicImageWater = "watermark.bmp";
// img .PublicFontString = "清清月儿";
// img .DealImage();
//水印文字
ReDrawImg img = new ReDrawImg();
img .Publi