使用 NodeJS API 将 BMP 转换为 EPS

概述

本文讲解如何使用 NodeJS 将 BMP 转换为 EPS。内容涵盖以下主题:

NodeJS 图像转 EPS

NodeJS 图像转 EPS

使用 NodeJS 将 JPG、TIFF、PNG 等其他格式的图像转换为 EPS 格式,与 BMP 格式类似。

NodeJS BMP 转 EPS

您可以通过免费的在线 BMP 转 EPS 转换器 检查 Aspose.Page BMP 转 EPS 的质量并查看结果,然后使用我们的 EPS 查看器 查看生成的 EPS 文件。

步骤:NodeJS 中 BMP 转 EPS 转换器 API 代码

只需调用 AsposeSaveImageAsEps 方法即可将图像保存为 EPS 文件。

使用字符串在 NodeJS 中将 BMP 保存为 EPS 文件

在以下 NodeJS 代码片段中,输入图像和输出 EPS 文件均通过字符串赋值:

 1const AsposePage = require('asposepagenodejs');
 2
 3const img_file = "./data/PAGENET-361-10.bmp";
 4
 5console.log("Aspose.Page for Node.js via C++ examples.");
 6
 7AsposePage().then(AsposePageModule => {
 8
 9    //SaveImageAsEps - convert image to EPS
10    const JSON = AsposePageModule.AsposeSaveImageAsEps(img_file, img_file + ".eps");
11    console.log("SaveImageAsEps => %O",  JSON.errorCode == 0 ? "Files(pages) count: " + JSON.filesCount.toString() + JSON.filesNameResult.toString() : JSON.errorText);
12
13},
14    reason => {console.log(`The unknown error has occurred: ${reason}`);}
15);

查看 JavaC++ 中 BMP 到 EPS 的转换。

在我们的 BMP 到 EPS 转换器 上在线评估 BMP 到 EPS 的转换效果。您可以一次将多个 BMP 图像转换为 EPS 文件,并在几秒钟内下载结果。

您可以从 GitHub 下载示例和数据文件。

Have any questions about Aspose.Page?



Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.