Picture Taker-A small label underneath

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
7 posts Page 1 of 1
Contributors
User avatar
Robby
VIP - Donator
VIP - Donator
Posts: 417
Joined: Mon Aug 03, 2009 4:01 am

Picture Taker-A small label underneath
Robby
Hello,

I have thought about this and i could not figure out on how to do this..

I have the same project as picture taker 2009 and i need help on getting a label on the bottom of the picture saying like "This Picture Was Taken In Picture Taker 2009 and all is there a way for that so it says that ?

Hope i explained the question

Answers would be appreciated..

Robby1998
My current Projects Listed Below:
Toixt++ Text Editor Just 10 or less more features to go!
Image
Image
User avatar
Robby
VIP - Donator
VIP - Donator
Posts: 417
Joined: Mon Aug 03, 2009 4:01 am

Is it too hard to know what i am talking about just reply and i wil help :)
My current Projects Listed Below:
Toixt++ Text Editor Just 10 or less more features to go!
Image
Image
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

Hello,


Try painting the text onto the picturebox control and then saving the image like this.

Are you using a picturebox to display the picture you take?

If so then use this code in your picturebox_paint event:
Code: Select all
        Dim drawString As String = "robby1998"
        Dim drawFont As New Font("Arial", 16)
        Dim drawBrush As New SolidBrush(Color.WhiteSmoke)
        Dim drawPoint As New PointF(80, 80)
        e.Graphics.DrawString(drawString, drawFont, drawBrush, drawPoint)    
    
Dim drawstring is the word/text you want to appear on your image
Dim drawBrush is the color of the word/text
Dim drawfont is the font style and size of the text
Dim drawPoint is the location within the picturebox where you want the text to appear

So change those to suite your need :D .

Then add this code to your save button or whichever control you use to save the image:
Code: Select all
Dim savefiledialog1 As New SaveFileDialog
        savefiledialog1.Title = "Save File"
        savefiledialog1.FileName = "MyCapture.bmp"
        savefiledialog1.Filter = "BMP |*.bmp"
        If savefiledialog1.ShowDialog() = DialogResult.OK Then
            Dim bmp As New Drawing.Bitmap(PictureBox1.Width, PictureBox1.Height)
            PictureBox1.DrawToBitmap(bmp, New Rectangle(0, 0, bmp.Width, bmp.Height))
            bmp.Save(savefiledialog1.FileName, Imaging.ImageFormat.Bmp)
        End If
And that should be it.

Happy coding! cooll;
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
Robby
VIP - Donator
VIP - Donator
Posts: 417
Joined: Mon Aug 03, 2009 4:01 am

ok thx i will try this out!

if it works then i will post another post or i will edit this

Robby1998
My current Projects Listed Below:
Toixt++ Text Editor Just 10 or less more features to go!
Image
Image
User avatar
Robby
VIP - Donator
VIP - Donator
Posts: 417
Joined: Mon Aug 03, 2009 4:01 am

umm...
I have put in the code but when i capture the image the text dissappears...

and also the picture is not full screen as it should be please help me?

Robby1998
My current Projects Listed Below:
Toixt++ Text Editor Just 10 or less more features to go!
Image
Image
User avatar
CodenStuff
Site Admin
Site Admin
Posts: 4389
Joined: Tue Aug 04, 2009 1:47 am

Hello robby1998,

Can you send me your project files attached in a Private Message or by email imbeta@live.co.uk and I will take a look and get the code working for you.

Thank you.
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
User avatar
Robby
VIP - Donator
VIP - Donator
Posts: 417
Joined: Mon Aug 03, 2009 4:01 am

uhh.. ok that will do i will send it right now

thx for the quick response :D
My current Projects Listed Below:
Toixt++ Text Editor Just 10 or less more features to go!
Image
Image
7 posts Page 1 of 1
Return to “Tutorial Requests”