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
With this function you can draw some text on an image, so that its easy to retrieve the position of text
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
gibtang
Member
65 Points
13 Posts
Invisible watermark using VB.NET
Aug 19, 2006 03:09 PM|LINK
hemanthlaxmi
Member
43 Points
33 Posts
Re: Invisible watermark using VB.NET
Aug 23, 2011 04:25 AM|LINK
With this function you can draw some text on an image, so that its easy to retrieve the position of text