tags:

views:

79

answers:

1

Hi. I'm making simple image editer by C# winform. I'm trouble with make zoom function. in other similar questions, many people simply suggest that 'change the size' such like..

Bitmap newImg = new Bitmap(oldImg, newWidth, newHeight);

But In this way, the picture become blured(is it cauesed by antialisng? I don't know well..) I need pixelated zoom Image. Like any other image editer such as photoshop or paint.net...

I tried also put pixelate fuction to make mosaic image. result was good but it was too slow! please help me. How can I make pixelate zoom?

A: 

Check out http://stackoverflow.com/questions/333589/image-resizing-in-net-with-antialiasing, this should get you started (I'm not sure but setting SmoothingMode = SmoothingMode.None means no anitaliasing).

Erik Philips
Oh, I got answer.e.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor;Just this one line make me happy :)Thank you for link.
Shongky