asp.net MVC-Ajax更新图片

I am trying to update an image scr using Ajax, first in the controllor:

 public ActionResult GenerateMIPImage(float pX = 0, float pY = 0, float pZ = 0)
    {
        FileContentResult result;
      ...
        im.SetViewPlane(new Point3D(pX, pY, pZ), new Vector3D(0, 0, 1), new Vector3D(0, 1, 0));
   ...
        objImage = im.Bitmap(outputSize, PixelFormat.Format24bppRgb, m);
        using (var memStream = new MemoryStream())
        {
            objImage.Save(memStream, ImageFormat.Png);
            result = this.File(memStream.GetBuffer(), "image/png");
        }

        return result;
    }

First time I display the image using:

<img src='<%=Url.Action("GenerateMIPImage")%>' alt="" id="dImage"/>

Then I am using this Ajax to change one of the variables:

$('#Zup').click(function () {
                pointZF++;
                //                alert(pointZF);
                $.ajax({
                    url: '/Home/GenerateMIPImage',
                    type: 'POST',
                    data: {
                        pX: pointXF,
                        pY: pointYF,
                        pZ: pointZF
                    },
                    success: function (data) {
                        dImage.src = data;
                    },
                    error: function () {

                    }
                });
            });

The image disapear, when it check its properties I get:

http://localhost:59601/�PNG

I would appreciate your suggestions, thanks in advance.

In your ajax you're trying to set the src of the img to image data instead of an image uri.
Instead set the src of the img to the url of the ajax request adding the parameters to the address and on the server side change the request method from post to get.

dImage.src = '/Home/GenerateMIPImage?'+$.param({
                    pX: pointXF,
                    pY: pointYF,
                    pZ: pointZF
                });

Kindly change the data part of your request as follow

 data: JSON.stringify({
                    pX: pointXF,
                    pY: pointYF,
                    pZ: pointZF
                }),