X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.app.core%2Fsrc%2Forg%2Fargeo%2Fapp%2Fimage%2FImageProcessor.java;h=eab49df64c3b24fa619b4414f3b9cb7bccb4fc6e;hb=8a1df848ff199669ef849d7d67c3c43101dbdfc8;hp=72c334f31b63bea9c5a8ac56c47dab0be6403e1a;hpb=ec618401d3cf0289cf344e199a57cc837b26ed6b;p=gpl%2Fargeo-suite.git diff --git a/org.argeo.app.core/src/org/argeo/app/image/ImageProcessor.java b/org.argeo.app.core/src/org/argeo/app/image/ImageProcessor.java index 72c334f..eab49df 100644 --- a/org.argeo.app.core/src/org/argeo/app/image/ImageProcessor.java +++ b/org.argeo.app.core/src/org/argeo/app/image/ImageProcessor.java @@ -196,13 +196,22 @@ public class ImageProcessor { } public static void main(String[] args) throws Exception { + if (args.length < 2) + throw new IllegalArgumentException( + "Usage: " + ImageProcessor.class.getSimpleName() + " "); Path imagePath = Paths.get(args[0]); Path targetPath = Paths.get(args[1]); + System.out.println("## Source metadata:"); + try (InputStream in = Files.newInputStream(imagePath)) { + metadataExample(in, null); + } + ImageProcessor imageProcessor = new ImageProcessor(() -> Files.newInputStream(imagePath), () -> Files.newOutputStream(targetPath)); imageProcessor.process(); + System.out.println("## Target metadata:"); try (InputStream in = Files.newInputStream(targetPath)) { metadataExample(in, null); }