Guest User

Untitled

a guest
Oct 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. using (Graphics g = Graphics.FromImage(bmp))
  2. {
  3. g.InterpolationMode = InterpolationMode.NearestNeighbor;
  4. g.DrawImage(bmp, new Rectangle(Point.Empty, bmp.Size));
  5. }
  6.  
  7. protected override void OnPaint(PaintEventArgs pe)
  8. {
  9. pe.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor;
  10. base.OnPaint(pe);
  11. }
Add Comment
Please, Sign In to add comment