在 C++ 中將 TIFF轉換為JPG

用於將TIFF轉換為JPG的高速軟件C++

使用C++獲得最大的TIFF到JPG轉換速度。這是一個完整的專業軟件解決方案,可C++ TIFF, JPG和許多其他文檔格式。

查看代碼片段

轉換 TIFF 到 JPG 在 C++

需要以 TIFF 圖像 JPG 格式嗎?隨著Aspose.Words for C++任何開發人員可以輕鬆地將 TIFF 成 JPG 只需幾行 C++ 代碼。

現代圖像處理 C++ API 從 TIFF 圖片高速 JPG 直接在瀏覽器中 TIFF 到 JPG 圖像轉換的質量。強大的 C++ 庫允許將 TIFF 圖像轉換為許多流行的圖形格式。

保存 TIFF 如 JPG 在 C++

以下示例演示如何將 TIFF 中的 JPG C++ 。

按照簡單的步驟將 TIFF 轉換為 JPG 格式。從本地驅動器讀取 TIFF 圖像,然後將其保存為 JPG JPG 擴展名指定所需的圖像格式。對於 TIFF 讀取和 JPG 寫入,您可以使用完全限定的文件名。輸出 JPG 內容將與原始 TIFF 圖像相同。

C++代碼示例將TIFF轉換為JPG格式
上傳您要轉換的文件
運行代碼
從列表中選擇目標格式
using namespace Aspose::Words;

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);

auto shape = builder->InsertImage(u"Input.tiff");        
shape->GetShapeRenderer()->Save(u"Output.jpg", MakeObject<ImageSaveOptions>(SaveFormat::Jpg));
using namespace Aspose::Words; auto doc = MakeObject<Document>(u"Input.tiff"); doc->Save(u"Output.jpg"); using namespace Aspose::Words; auto doc = MakeObject<Document>(u"Input.tiff"); for (int page = 0; page < doc->get_PageCount(); page++) { auto extractedPage = doc->ExtractPages(page, 1); extractedPage->Save(String::Format(u"Output_{0}.jpg", page + 1)); } using namespace Aspose::Words; auto doc = MakeObject<Document>(); auto builder = MakeObject<DocumentBuilder>(doc); builder->InsertImage(u"Input.tiff"); doc->Save(u"Output.jpg"); using namespace Aspose::Words; auto doc = MakeObject<Document>(); auto builder = MakeObject<DocumentBuilder>(doc); auto shape = builder->InsertImage(u"Input.tiff"); shape->GetShapeRenderer()->Save(u"Output.jpg", MakeObject<ImageSaveOptions>(SaveFormat::Svg));
運行代碼
在社交媒體上分享代碼:

如何將TIFF轉換為JPG

  1. Aspose.Words for C++安裝 Aspose.Words。
  2. 將庫引用(導入庫)添加到您的C++項目。.
  3. 在C++打開源TIFF文件。.
  4. 調用Save()方法,傳遞帶有JPG擴展名的輸出文件名。.
  5. TIFF轉換的結果JPG 。.

C++庫將TIFF轉換為JPG

有三個選項可以將 Aspose.Words for C++ 安裝到您的開發人員環境中。請選擇符合您需求的一種,並按照分步說明進行操作:

系統要求

您可以使用這個 C++ 庫在 Microsoft Windows 、Linux 和 macOS 操作系統上開發軟件:

  • Linux 需要 GCC >= 6.3.0 和 Clang >= 3.9.1
  • Xcode >= 12.5.1 ,macOS 需要 Clang 和 libc++

如果您為 Linux 或 macOS 開發軟件,請查看產品文檔中 fontconfig 和 mesa-glu 開源包)的信息。

其他支持的TIFF轉換

您可以將TIFF轉換為許多其他文件格式:

5%

訂閱 Aspose 產品更新

獲取直接發送到您的郵箱的每月通訊和優惠。

© Aspose Pty Ltd 2001-2024. 版權所有。