Groups | Blog | Home
all groups > dotnet drawing api > july 2003 >

dotnet drawing api : How to choose bilinear or bicubic algorithm when resizing an image ?


Cedric Girard
7/30/2003 3:49:28 PM
Hello

I have seen in the DotNet Documentation that it coult be possible to choose
the algorithm when we resize an image (JPEG format). Could you give me an
example ?...

Thanks !

Cedric, France

Bob Powell [MVP]
7/30/2003 7:43:35 PM
When you resize an image, you'll do so by drawing it to an in-memory bitmap
that has been created to accommodate the new size. To do this, you'll need
to obtain a Graphics object for the bitmap using Graphics.FromImage. When
you have this Graphics object you can set the interpolation mode and
smoothing modes any way you require.

--
Bob Powell [MVP]
C#, System.Drawing

Check out the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Buy quality Windows Forms tools
http://www.bobpowell.net/xray_tools.htm

New Tips and Tricks include creating transparent controls
and how to do double buffering.

[quoted text, click to view]

AddThis Social Bookmark Button