Skip to main content
Interwork Corporation
IDR Solutions Product Support Portal
モードの切替 ダーク/ライト/自動 モードの切替 ダーク/ライト/自動 モードの切替 ダーク/ライト/自動

複数ページのTIFFを単一のTIFFファイルに変換する

JDeliは、個々のTIFF画像を単一の複数ページTIFFファイルに変換することができます。

複数ページTIFFから単一のTIFFファイルへ変換するための読み込み/書き込みメソッド

  1. 複数ページTIFF画像をJavaに読み込む(他のサポートされている画像も処理可能)
TiffDecoder decoder = new TiffDecoder();
BufferedImage image = decoder.read(imageData);
  1. 必要に応じて画像を処理 する
  2. Java画像を複数の画像TIFFファイルに書き出す
for (int i = 0; i <= decoder.getPageCount(); i++) {
    BufferedImage image = decoder.read(i);
    TiffEncoderOptions options = new TiffEncoderOptions();
    
    //optionsインスタンスにオプションを設定 - 以下に例を示します
    options.setCompressionFormat(TiffCompressionFormat.DEFLATE);
    options.setXmpMetaData("xmp metadata");
    
    //書き出し
    JDeli.write(image, options, outputStreamOrFile);
}

これはTiffDecoder クラスを使用します