Adding 20 pix to an image?

Hello

I have an image which has the size 176x180. Now I want to have the size 176x200 and I want to add 20 pix on the top of the image...

Is this possible?

Thanks

Sven
RuttensoftAsked:
Who is Participating?
 
gregoryyoungCommented:
       Dim original As Image = YourImage
        Dim bmp As New Bitmap(176, 200)
        Dim graphic As Graphics = Graphics.FromImage(bmp)
        Dim p As New Point(0, bmp.Size.Height - original.Size.Height)
        graphic.DrawImage(original, p)
0
 
gregoryyoungCommented:
Sure draw it onto a graphics object of the correct size ... then write it back out as an image again ...

Grreg
0
 
RuttensoftAuthor Commented:
Thanks!

Could you post a code for this (500 points)

Thanks

Sven
0
 
gregoryyoungCommented:
bmp contains a bitmap of your new image just save it display it etc.
0
 
RuttensoftAuthor Commented:
Thanks alot
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.