Invisible watermark using VB.NEThttp://forums.asp.net/t/1019015.aspx/1?Invisible+watermark+using+VB+NETTue, 23 Aug 2011 04:25:22 -040010190151375419http://forums.asp.net/p/1019015/1375419.aspx/1?Invisible+watermark+using+VB+NETInvisible watermark using VB.NET I've a project where users can upload images onto the server and i have to add an invisible water mark into it. anyway,i've recommended that it would be better to purchase or use a 3rd party API that allows the invisible watermarking to be done using VB.NET. So i was wondering does anyone have any recommendations 2006-08-19T15:09:50-04:004565399http://forums.asp.net/p/1019015/4565399.aspx/1?Re+Invisible+watermark+using+VB+NETRe: Invisible watermark using VB.NET <p><strong><strong><span color="#c00000" style="color:#c00000">With this function you can draw some text on an image, so that its easy to retrieve the position of text</span><br> </strong></strong></p> <pre class="prettyprint">Imports System.Drawing.Imaging Imports System.Drawing Private Sub TextOnImage(ByVal OldImage As String, ByVal NewImage As String, ByVal Text As String, ByVal Format As ImageFormat, ByVal Font As Font, ByVal Color As Color, ByVal Position As Point) Dim TmpSize As System.Drawing.Size Dim Image As Image = System.Drawing.Image.FromFile(OldImage) Dim Brush As New SolidBrush(Color) 'Read Image Dimensions TmpSize.Height = Image.Height TmpSize.Width = Image.Width 'Create a new Bitmap Object Dim NewBitmap As New System.Drawing.Bitmap(Image, TmpSize) 'Create a new Graphic Object Dim Graphic As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(NewBitmap) 'Draw String on Image Graphic.DrawString(Text, Font, Brush, Position) 'Save new Image NewBitmap.Save(NewImage, Format) Graphic.Dispose() NewBitmap.Dispose() End Sub</pre> 2011-08-23T04:25:22-04:00