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

画像にガウシアンぼかしを適用する

これは何をするのか?

ガウシアン操作は、3*3のカーネル行列を使用して画像にぼかしを適用するために使用できます。

JavaでBufferedImageにガウシアンぼかしを適用する

ImageProcessingOperations operations = new ImageProcessingOperations();

// スケール、ぼかしなど、複数の操作をここでチェーンできます
operations.gaussianBlur(); 
        
// BufferedImageに操作を適用します
BufferedImage modifiedImage = operations.apply(BufferedImage originalImage);

ガウシアンぼかし操作のJavadocを表示

追加のコード例

以下のコード例を使用して、画像フォーマット間の処理と変換を行います:

Fileを使用する場合

File inputFile = new File("path/to/file");
File outputFile = new File("path/to/output--file");
JDeli.convert(inputFile, outputFile, operations);

InputStreamとOutputSteamを使用する場合

final InputStream inputStream = new FileInputStream(inputFile);
final OutputStream outputStream = new FileOutputStream(outputFile);
final String outputFormat = "format"; // 出力ファイルのフォーマット 例: png, jpeg,...;
JDeli.convert(inputStream, outputStream, outputFormat, operations);

byte[]を使用する場合

byte[] inputData = Files.readAllBytes(Paths.get("/path/to/file"));
final String outputFormat = "format"; // 出力ファイルのフォーマット 例: png, jpeg,...;
byte[] outputData = JDeli.convert(inputData, outputFormat, operations);