2

I'm making simple image editor 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 caused by antialiasing? I don't know well...) I need pixelated zoom Image. Like any other image editor such as Photoshop or paint.net...

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

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Shongky
  • 25
  • 5

1 Answers1

1

Check out Image resizing in .Net with Antialiasing, this should get you started (I'm not sure but setting SmoothingMode = SmoothingMode.None means no anitaliasing).

Community
  • 1
  • 1
Erik Philips
  • 53,428
  • 11
  • 128
  • 150
  • 3
    Oh, I got answer. e.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor; Just this one line make me happy :) Thank you for link. – Shongky Jul 30 '10 at 00:20