需要以编程方式将图像转换为 图片 文档吗?使用Aspose.Words for .NET您只需使用几行 C# 代码即可将图像转换为 图片:
我们的 C# API 从具有专业质量的图像 图片 直接在浏览器中测试最高质量的图像到 图片 强大的 .NET 转换 API 允许将图像转换为多种流行格式。
支持以下图像格式: TIFF, JPEG, PNG, BMP, SVG, EMF, GIF 。
支持以下 图片 文档格式:
以下示例演示了如何 C# 图片 文档格式。
按照简单的步骤将图像文件转换为 图片 文档格式。从本地驱动器读取您的图像,然后只需将其保存为文档格式,通过 图片 文档扩展名指定所需的文件格式。对于图像读取和 图片 文档写入,您可以使用完全限定的文件名。
using Aspose.Words;
var doc = new Document();
var builder = new DocumentBuilder(doc);
builder.InsertImage("Input.png");
doc.Save("Output.txt");
using Aspose.Words;
var doc = new Document("Input.png");
doc.Save("Output.txt");
using Aspose.Words;
var doc = new Document("Input.png");
for (int page = 0; page < doc.PageCount; page++)
{
var extractedPage = doc.ExtractPages(page, 1);
extractedPage.Save($"Output_{page + 1}.txt");
}
using Aspose.Words;
var doc = new Document();
var builder = new DocumentBuilder(doc);
builder.InsertImage("Input.png");
doc.Save("Output.txt");
using Aspose.Words;
var doc = new Document();
var builder = new DocumentBuilder(doc);
var shape = builder.InsertImage("Input.png");
shape.ImageData.Save("Output.txt");
在您的系统上 "Aspose.Words for .NET" 有三个备选选项。请选择符合您需求的一种,并按照分步说明进行操作:
我们的产品是完全跨平台的,并支持遵循 '.NET Standard 2.0' 规范的所有主要 .NET 实现:
至于 .NET 代码不依赖于底层硬件或操作系统,而只依赖于虚拟机,您可以自由地为 Windows、macOS、Android、iOS 和 Linux 开发任何类型的软件。只需确保您已安装相应版本的 .NET Framework, .NET Core, Windows Azure, Mono 或 Xamarin 。
我们建议使用 Microsoft Visual Studio、Xamarin 和 MonoDevelop 集成开发环境来创建 C#, F#, VB.NET 应用程序。
欲了解更多详情,请参阅产品文档。
您可以将图片转换为许多其他文件格式: