السلام عليكم
لقد اعتمدت على هذا الكود
https://msdn.microsoft.com/en-us/library/ee412267%28v=office.12%29.aspx
لتصدير صور الى PowerPoint
لم يبقى الى وضع الصور المصدرة في وسط الصفحة
private static Slide GenerateSlidePart(string imageName,string imageDescription, long imageWidthEMU, long imageHeightEMU)
{
var element =
new Slide(
new CommonSlideData(
new ShapeTree(
new NonVisualGroupShapeProperties(
new NonVisualDrawingProperties()
{ Id = (UInt32Value)1U, Name = ""},
new NonVisualGroupShapeDrawingProperties(),
new ApplicationNonVisualDrawingProperties()),
new GroupShapeProperties(
new a.TransformGroup(
new a.Offset() { X = 0L, Y = 0L },
new a.Extents() { Cx = 0L, Cy = 0L },
new a.ChildOffset() { X = 0L, Y = 0L },
new a.ChildExtents() { Cx = 0L, Cy = 0L })),
new Picture(
new NonVisualPictureProperties(
new NonVisualDrawingProperties()
{
Id = (UInt32Value)4U,
Name = imageName,
Description = imageDescription,
},
new NonVisualPictureDrawingProperties(
new a.PictureLocks() { NoChangeAspect = true }),
new ApplicationNonVisualDrawingProperties()),
new BlipFill(
new a.Blip() { Embed = "relId1" },
new a.Stretch(
new a.FillRectangle())),
new ShapeProperties(
new a.Transform2D(
new a.Offset() { X = 0L, Y = 0L},
new a.Extents()
{
Cx = imageWidthEMU,
Cy = imageHeightEMU,
}),
new a.PresetGeometry(new a.AdjustValueList()){ Preset = a.ShapeTypeValues.Rectangle}
)))),
new ColorMapOverride(
new a.MasterColorMapping()));
return element;
}