0

I don't know how to do this, but this is what I want do:

  1. Zoom in/out an image with the scroll wheel.
  2. I don't want a blurry zoom in, but a pixelated zoom in.
  3. Zoom with starting point from where the cursor is.
  4. The pictureBox shall become bigger/smaller when I zoom (so that the image continues beyond the form edges).

This is how it should look:

Just the whole image enter image description here

Placing the cursor at the top of mickeys nose and zooming in enter image description here

I can recognize the mouse wheel at least:

public Main()
        {
            InitializeComponent();
            MouseWheel += new MouseEventHandler(mousewheel);
        }
        void mousewheel(object sender, MouseEventArgs e)
        {
            if (e.Delta > 0) { Zoom("in"); }  // up
            else if (e.Delta < 0) { Zoom("out"); }  // down
        }
        public void Zoom(string in_or_out)
        {
            if (in_or_out == "in")
            {

            }
        }
spunit
  • 523
  • 2
  • 6
  • 23

0 Answers0