How to Edit an Image

Posts 1–15 of 32 · Page 1 of 3
How to Edit an Image
Ok, so lets say you have an image, and you has a text box. You insert text in the textbox. How would you make it appear on the picture?

My idea was to just put a label over it, but then you can't save it with the text on it...
Microsoft made something you can import and you have all the features that are in paint.
I don't know what ones tho.
Quote Originally Posted by Blubb1337 View Post
GDI......?
No.. the program itself has to work on the actual image, and produce it as one image.
herp herp:

[highlight=vb.net]
Private Sub DrawStringToPicture(ByVal thePicture As PictureBox, ByVal theString As String, ByVal theLocation As Point, ByVal theColor As Color, ByVal theFont As Font)
Using g As Graphics = Graphics.FromImage(PictureBox1.Image)
g.DrawString(theString, theFont, New SolidBrush(theColor), theLocation)
End Using
End Sub
[/highlight]

If you can't figure out how to use it...Idk.
Quote Originally Posted by Jason View Post
herp herp:

[highlight=vb.net]
Private Sub DrawStringToPicture(ByVal thePicture As PictureBox, ByVal theString As String, ByVal theLocation As Point, ByVal theColor As Color, ByVal theFont As Font)
Using g As Graphics = Graphics.FromImage(PictureBox1.Image)
g.DrawString(theString, theFont, New SolidBrush(theColor), theLocation)
End Using
End Sub
[/highlight]

If you can't figure out how to use it...Idk.
That would probably work, though, it has to equal textbox1.text
Quote Originally Posted by Cryptonic View Post


That would probably work, though, it has to equal textbox1.text
-.-

[highlight="VB.Net"]Private Sub DrawStringToPicture(ByVal thePicture As PictureBox, ByVal theString As String, ByVal theLocation As Point, ByVal theColor As Color, ByVal theFont As Font)
Using g As Graphics = Graphics.FromImage(PictureBox1.Image)
g.DrawString(Textbox1.Text, theFont, New SolidBrush(theColor), theLocation)
End Using
End Sub [/highlight]
Quote Originally Posted by Blubb1337 View Post
-.-

[highlight="VB.Net"]Private Sub DrawStringToPicture(ByVal thePicture As PictureBox, ByVal theString As String, ByVal theLocation As Point, ByVal theColor As Color, ByVal theFont As Font)
Using g As Graphics = Graphics.FromImage(PictureBox1.Image)
g.DrawString(Textbox1.Text, theFont, New SolidBrush(theColor), theLocation)
End Using
End Sub [/highlight]
Wait, for the font, i forget how to insert...

i think vb 06 was

font = "times new roman" or font.timesnewroman or sumthin.
Quote Originally Posted by Blubb1337 View Post
-.-

[highlight="VB.Net"]Private Sub DrawStringToPicture(ByVal thePicture As PictureBox, ByVal theString As String, ByVal theLocation As Point, ByVal theColor As Color, ByVal theFont As Font)
Using g As Graphics = Graphics.FromImage(PictureBox1.Image)
g.DrawString(Textbox1.Text, theFont, New SolidBrush(theColor), theLocation)
End Using
End Sub [/highlight]
There's a "theString" param for a reason nubdick.

Just call it with DrawStringToPicture(PictureBox1, TextBox1.Text.....etc)
Quote Originally Posted by Jason View Post


There's a "theString" param for a reason nubdick.

Just call it with DrawStringToPicture(PictureBox1, TextBox1.Text.....etc)
Ide rather use a way i understand then what i dont understant.
Quote Originally Posted by Cryptonic View Post


Ide rather use a way i understand then what i dont understant.
If you don't understand how to pass a parameter to a function you're really fucked

Don't tell me you've never used a messagebox.
Quote Originally Posted by Jason View Post


If you don't understand how to pass a parameter to a function you're really fucked

Don't tell me you've never used a messagebox.
Of course ive used a message box. But i don't get what your getting at.
And How I set the Location :_p?
Quote Originally Posted by alvaritos View Post
And How I set the Location :_p?
it think somethin like 15, 45
Sweet christ. LOOK AT THE GODFORESAKEN METHOD SIGNATURE.

There's parameters to control pretty much everything about the drawString. You can set what to write, where to write it, what font to write it in, and what color to write it in, WITHOUT HARDCODING THE METHOD BODY.
Posts 1–15 of 32 · Page 1 of 3

Post a Reply

Tags for this Thread

None

Talk with us