如何C#调整图片大小Docx

问题描述 投票:1回答:1

我使用以下代码添加图片,但我不调整图像大小

var myImageFullPath = "ex.jpg";

using (DocX document = DocX.Create("ex.docx"))
{
    Image image = document.AddImage(myImageFullPath);
    Picture picture = image.CreatePicture();
    Paragraph title = document.InsertParagraph().Append("TEST");
    title.Alignment = Alignment.center;        
    Paragraph p1 = document.InsertParagraph();
    p1.AppendPicture(picture);                
    document.Save();
}
c# image size add docx
1个回答
0
投票

已解决THX Picture picture = image.CreatePicture(400,600);

© www.soinside.com 2019 - 2024. All rights reserved.