I am sorry for the delayed response but I was working on your specified problem. Below please find the code snippet that I have written for changing the image in a picture frame and it retained the properties of cropping as in source presentation file. For your kind reference, I have also shared the generated presentation file as well.
Dim fPPTPath As String = "D:\\ppt\\"
'Get the Ptah of the pPt saved in Report folder
Dim PPTFullPath As String = fPPTPath + "CroppedTemplatePage.pptx"
'Open the PPT
Dim presnew As PresentationEx = New PresentationEx(PPTFullPath)
'loop through all Slides to replace all images which have Alt Text
For Each slide As SlideEx In presnew.Slides
For Each shape As Aspose.Slides.Pptx.ShapeEx In slide.Shapes
'check if the shape is Picture
If TypeOf shape Is PictureFrameEx Then
Dim pic As PictureFrameEx = CType(shape, PictureFrameEx)
If pic.AlternativeText = "Art" Then
'get d absolute path of newpic
Dim str As String = fPPTPath + "Winter.jpg"
If File.Exists(str) Then
'Adding Image to Picture frame
Dim img As System.Drawing.Image = CType(New Bitmap(str), System.Drawing.Image)
Dim imgx As ImageEx = pic.Presentation.Images.AddImage(img)
pic.PictureFormat.Picture.Image = imgx
End If 'File exists
End If 'Checking Alternative text
End If 'checking picture frame
' //Save the modified PPT
Dim output_file_name As String = fPPTPath + "TestImgCrop.pptx"
Thanks and Regards,