Click here to Skip to main content
15,910,980 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all.

I need some dll or code that helps me add a watermark to audio or video files.
I did some search online but most results included Microsoft.Directx which I couldn't can you please help me with this.

Thnx in advance
Posted

I doubt if any .NET component or free component allows the same. You might need a third party component for it.

Have a look at the following discussions:
Digital SIgnature on video[^]
How to add watermark on video file? [^]
 
Share this answer
 
Comments
AR1988 7-May-12 10:08am    
I found nothing useful following your links.
Sandeep Mewara 7-May-12 10:12am    
Ok. Good to know.
 
Share this answer
 
Comments
MuhtarQong 7-May-12 15:18pm    
You may add water mark for each frame of the video; Please see the following links. It might help you.
http://artuxsoft.com/document_imaging.aspx
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.
C#

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900