I have made a function for you. You may call this function for each frame of your video which frames are suppose to be water marked.
// Created by Muhtar Qong: May 7, 2012
public Image AddWaterMarkToVideoFrames(Image videoFrame, Image waterMark, float transparency)
{
System.Drawing.Imaging.ImageAttributes ia = new System.Drawing.Imaging.ImageAttributes();
System.Drawing.Imaging.ColorMatrix cm = new System.Drawing.Imaging.ColorMatrix();
cm.Matrix33 = transparency;
ia.SetColorMatrix(cm);
Graphics g = null;
try
{
g = Graphics.FromImage(videoFrame);
// Rene Des Cartes: 1596; You may define the rect size freely.
Rectangle rect = new Rectangle((int)(videoFrame.Width * 0.1), (int)(videoFrame.Height * 0.2), (int)(videoFrame.Width * 0.8), (int)(videoFrame.Height * 0.6));
g.DrawImage(waterMark, rect, 0, 0, waterMark.Width, waterMark.Height, GraphicsUnit.Pixel, ia);
return videoFrame;
}
catch (Exception ex)
{
throw ex;
}
finally
{
g.Dispose();
}
}
Please copy this and try it.