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 / Languages / C# / July 2007

Tip: Looking for answers? Try searching our database.

Resize Graphic Images II

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonathan Wood - 22 Jul 2007 19:13 GMT
Okay, I figured out how to resize an image by creating a new bitmap and
specifying the new size when I do.

I don't suppose there's any support for resizing with anti-aliasing so that
I get a smoother image is there? Any tips?

Thanks.

Jonathan
Peter Duniho - 22 Jul 2007 19:24 GMT
> Okay, I figured out how to resize an image by creating a new bitmap and  
> specifying the new size when I do.
>
> I don't suppose there's any support for resizing with anti-aliasing so  
> that I get a smoother image is there? Any tips?

Yes (ignoring for the moment any semantic difference between  
"anti-aliasing" and "interpolation" :) ).

Create a new empty Bitmap rather than using one Bitmap as the source for  
another, get a Graphics instance from that Bitmap, set the interpolation  
quality you want on the Graphics instance, and use Graphics.DrawImage() to  
render the original bitmap into the new Bitmap.

Pete
Jonathan Wood - 22 Jul 2007 21:06 GMT
Peter,

>> Okay, I figured out how to resize an image by creating a new bitmap and
>> specifying the new size when I do.
[quoted text clipped - 4 lines]
> Yes (ignoring for the moment any semantic difference between
> "anti-aliasing" and "interpolation" :) ).

Thanks for the correction.

> Create a new empty Bitmap rather than using one Bitmap as the source for
> another, get a Graphics instance from that Bitmap, set the interpolation
> quality you want on the Graphics instance, and use Graphics.DrawImage() to
> render the original bitmap into the new Bitmap.

I didn't quite follow every bit of that but I'll bet I can figure it out
from your description. And I'm thrilled that this can actually be done!

Thanks!

Signature

Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com


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.