我陷入了位于“使用 OpenXML 替换 word doc 中的图像”的问题。我注意到有几种ImagePartType类型。除了通过扩展名之外,是否有任何简单的“内置”方法来确定特定图像应该是哪种类型?ImagePartType 枚举也用于 PowerPoint 中,就像许多 WordProcessingML 结构一样。
例如,ImagePartType.Bmp on image1.bmp
ImagePartType.Emf on image1.emf
ImagePartType.Gif on image1.gif ImagePartType.Icon on image1.ico ImagePartType.Jpeg on image1.jpeg 或 image1.jpg ImagePartType.Pcx on
image1.pcx ImagePartType .Png on
image1.png ImagePartType.Tiff on image1.tiff 或 image1.tif
ImagePartType.Wmf on image1.wmf