Search code examples
c#graphicsbitmapstretching

Stretch Bitmap without anti-aliasing


I found this example and used it How do you resize a Bitmap under .NET CF 2.0

However my image looks horrible because of anti aliasing. It no longer looks pixelated as it should. How do i disable anti aliasing?


Solution

  • Set the interpolation mode to nearest neighbor:

    g.InterPolationMode = InterpolationMode.NearestNeighbor