Question how to delete part of a watermark

inkedgfx

Well-known member
Joined
Sep 29, 2012
Messages
139
Location
USA
Programming Experience
Beginner
I am in need of some assistance!

I need to delete part of a watermark on an image. I have the watermark being drawn twice but the second one is drawn 2 pixels offset from the first. what I want to do is delete the overlapping watermark. the watermark on the bottom is the shadow , I would like to delete this overlapping part and leave the 2 pixels for a shadow effect.

any help with this is appreciated

InkedGFX
 
Wait a sec, how are you setting the opacity?


EDIT:: Just had a quick root online and the best I can do for you is something like this:


Dim myBrush As New SolidBrush(Color.FromArgb(150, 173, 181))
      Dim myBrushShadow As New SolidBrush(Color.FromArgb(128, 0, 0, 0))
      Dim myOpBrush As New SolidBrush(Color.FromArgb(128, 255, 255, 255))

. . . . . . . . . . . . . . . . . 

      NewImage.DrawString(TextBox1.Text, wmFont, myBrushShadow, 602, 402)
      NewImage.DrawString(TextBox1.Text, wmFont, myOpBrush, 600, 400)
      NewImage.DrawString(TextBox1.Text, wmFont, myBrush, 600, 400)




It turns this:
PlainWaterMark.jpg




Into this:
WithOpacity.jpg


Hope it helps
 
Last edited:
I set the opacity from whatever the user selects.....here is the code

If rbTenPercent.Checked = True Then
sOpacity = 25
ElseIf rbtwentyFivepercent.Checked = True Then
sOpacity = 64
ElseIf rbfiftypercent.Checked = True Then
sOpacity = 128
ElseIf rbSeventyFivePercent.Checked = True Then
sOpacity = 191
ElseIf rbOneHundredPercent.Checked = True Then
sOpacity = 235
End If

then i set the opacity in the brush....

myBrushShadow = New SolidBrush(Color.FromArgb(sOpacity - 10, Color.Black))
myBrush = New SolidBrush(Color.FromArgb(sOpacity, wmColor))

InkedGFX
 
ok here are a few images of the watermark result and the program in action.

watermark_01.pngprogram-screenshot.png

thanks again 22-Degrees

InkedGFX
 
Back
Top