?
Solved

Adding 20 pix to an image?

Posted on 2005-05-07
5
Medium Priority
?
191 Views
Last Modified: 2010-04-23
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
0
Comment
Question by:Ruttensoft
  • 3
  • 2
5 Comments
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 13950971
Sure draw it onto a graphics object of the correct size ... then write it back out as an image again ...

Grreg
0
 

Author Comment

by:Ruttensoft
ID: 13950984
Thanks!

Could you post a code for this (500 points)

Thanks

Sven
0
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 2000 total points
ID: 13951029
       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
 
LVL 37

Expert Comment

by:gregoryyoung
ID: 13951031
bmp contains a bitmap of your new image just save it display it etc.
0
 

Author Comment

by:Ruttensoft
ID: 13951059
Thanks alot
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Loops Section Overview
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question