So, I'm working on a sort-of image manipulation program in .NET, and I'm trying to draw an image to the screen, and when you mouse wheel you zoom into the image to view individual pixels (similar to microsoft paint, etc).
I'm using the code
in the form OnPaint method to do this.
However, I noticed I was getting smoothing when I zoomed in, and the pixels were looking blurry. I found on another topic that I could set the "InterpolationMode" and adjust the smoothing method to get the "blocky" pixels I wanted, the other article said "NearestNeighbor" would do it.
However this isn't quite right... it is shifting the first pixel for some reason. See the attached image. Also see the original bitmap in microsoft paint, Each row is supposed to be two pixels wide, and the "Nearestneighbor" interpolation seems to halve the first row and column of pixels.
Is there a way to turn interpolation off altogether? I'm trying to find a way to not iterate through each pixel and draw the individual squares...
Thanks for any thoughts.