匯出 AnyBitmap
using IronSoftware.Drawing;

//Export AnyBitmap files to other formats with ability to control loss
AnyBitmap bitmap = new AnyBitmap(@"FILE_PATH");
bitmap.ExportFile("losslogo.png", AnyBitmap.ImageFormat.Png, 100);


NuGet 下載
PM > Install-Package IronSoftware.System.Drawing
匯出 AnyBitmap

匯出 AnyBitmap

AnyBitmap 檔案從 IronDrawing 工具生成,可以匯出到其他影像格式,並可以指定匯出影像的損失程度。 這使用戶能夠平衡所需圖像質量與導出圖像文件的大小。

匯出 AnyBitmap 檔案

要將 AnyBitmap 檔案匯出為另一種影像格式,您只需載入 AnyBitmap 檔案並使用 .ExportFile() 方法。 此方法有三個重載版本,可用於設定:

  1. 匯出檔案名稱
  2. 影像格式
  3. 影像質量損失

匯出的影像可以採用以下格式之一:

  • Bmp: 位圖影像檔
  • Gif: 圖形交換格式
  • Png: 可攜式網路圖形
  • Jpeg: 聯合影像專家小組
  • Tiff: 標記影像檔格式
  • Webp: 網頁圖片
  • Wbmp: 無線位圖
  • Wmf: Windows 中繼檔
  • Icon: 圖示檔
在 GitHub 查看

準備好開始了嗎?

NuGet 下載次數 21,851,269版本:2026.11剛剛發布