Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Drawing / December 2003

Tip: Looking for answers? Try searching our database.

About resize bitmap problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Yiu - 28 Dec 2003 08:18 GMT
I want to resize bitmap use old bitmap coordinate using C#
for example.
i want to get old bitmap (25,25) to (100,100) this rectangle to place
on the new bitmap
then return the new bitmap.
is it possible to do it?
Any one can help me?
thx
Crirus - 28 Dec 2003 08:23 GMT
In VB:
Dim your new bitmap

Dim nb as Bitmap=New Bitmap(100,100)
Dim  g as Graphics=Graphics.FromImage(nb)
g.DrawImage(oldBitmap,new Rectangle(0,0,100,100), New Rectangle(0,0,25,25),
PixelFormat....)

Convert that in C#

> I want to resize bitmap use old bitmap coordinate using C#
> for example.
[quoted text clipped - 4 lines]
> Any one can help me?
> thx
John Hornick [MSFT] - 29 Dec 2003 02:27 GMT
Hi,

Create a new Bitmap of the desired size, wrap a Graphics around it,
and draw the original onto the new one. Then Destroy() the Graphics
and you should be all set.

Thanks,
- John
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Visit http://www.microsoft.com/security for current information on security.

> I want to resize bitmap use old bitmap coordinate using C#
> for example.
[quoted text clipped - 3 lines]
> is it possible to do it?
> Any one can help me?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.