How to crop an image with oval/circle/roundrectangle shape based on VB.net?

Hi, Support:
Would you please provide me a full demo to show how to crop an image with oval/circle/roundrectangle shape based on VB.net?
below is my codes, but it results in wrong position image.

    Dim Img As New PngImage(CropW, CropH, PngColorType.TruecolorWithAlpha)
    Dim cmxPic = New Aspose.Imaging.ColorMatrix()
   Dim Opacity as single=255
    cmxPic.Matrix33 = Opacity / 255.0F
    Dim iaPic = New Aspose.Imaging.ImageAttributes()
    iaPic.SetColorMatrix(cmxPic, Aspose.Imaging.ColorMatrixFlag.Default, Aspose.Imaging.ColorAdjustType.Bitmap)
    Dim InputImg As Aspose.Imaging.Image = Aspose.Imaging.Image.Load(InputFile)
    Dim g As Aspose.Imaging.Graphics = New Aspose.Imaging.Graphics(Img)
   g.Clear(Aspose.Imaging.Color.Transparent)
    Dim path As New Aspose.Imaging.GraphicsPath()
    Dim Figure As New Aspose.Imaging.Figure()
    Dim EllipseShape As EllipseShape
         EllipseShape = New EllipseShape(New Aspose.Imaging.RectangleF(CropX, CropY, CropW, CropH))
        Figure.AddShape(EllipseShape)
        path.AddFigure(Figure)
        g.Clip = New Aspose.Imaging.Region(path)
        g.DrawImage(InputImg, New Aspose.Imaging.Point(0, 0))
      Dim PngOps As New PngOptions()
    PngOps.ColorType = PngColorType.GrayscaleWithAlpha
    PngOps.ColorType = PngColorType.TruecolorWithAlpha
    Do
        On Error Resume Next
        Img.Save(SavetoFile, PngOps)
     Loop While Err.Number = 61 And Not NoTip
    InputImg.Dispose()
    InputImg = Nothing
    Return Img

=============================================
As for the above codes, the Output image is wrong with incorrect position, and the parameter Opacity cannot be applied.

How tho fix it or is there any right method to get this purpose?

Please see the oval crop result image here:Overlay.jpg (33.3 KB)
the right oval crop output image should be a full display image, but it only partially displayed with wrong position.

@ducaisoft, this question you asked before in Does the aspose.imaging.dll support circle/oval/roundRetangle image clip? and we do not have additional information and vb.net example, only C# we can provide for you.

Thanks for your inforamtion. I use an alternative method to get it ok.
please see it:
Overlay.jpg (93.3 KB)

@ducaisoft, looks good.

However, I try your code to roundRectangle cut, it output an empty image without any content. Why?How to fix it?

@ducaisoft, proposed example code works ok and produces expected output. result.png (66.5 KB)
Please note, Aspose.Imaging does not support build-in round rectangle path, so you can try implement your own.