commit fa466d2dfc0debe9a0c216d036a8771a4147a994 Author: xamidev Date: Wed Jan 14 21:18:15 2026 +0100 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..857e263 --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ +.kotlin + +### IntelliJ IDEA ### +.idea +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store diff --git a/README.md b/README.md new file mode 100644 index 0000000..69ac3d3 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# librewatmark (work in progress) + +Tool to put a watermark on sensitive documents. Useful to mitigate identity theft etc. +Some services for this already exist on the Web, but then you have to trust them. Here the program runs on your machine, offline. +Using the ImageJ library. diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..55d8067 --- /dev/null +++ b/pom.xml @@ -0,0 +1,24 @@ + + + 4.0.0 + + org.example + librewatermark + 1.0-SNAPSHOT + + + 17 + 17 + UTF-8 + + + + net.imagej + ij + 1.51h + + + + \ No newline at end of file diff --git a/src/main/java/org/example/Main.java b/src/main/java/org/example/Main.java new file mode 100644 index 0000000..8c4f635 --- /dev/null +++ b/src/main/java/org/example/Main.java @@ -0,0 +1,73 @@ +package org.example; + +import ij.IJ; +import ij.ImagePlus; +import ij.process.ImageProcessor; + +import java.awt.*; +import java.io.File; + +/* +TODO: +- Parse properly the CLI arguments +- Add error handling +- Write many lines with an angle +- Write for any image (format & responsiveness) +- optional: Export to PDF? + */ + +public class Main { + public static void main(String[] args) { + + if (args.length == 0) + { + System.out.println("Usage: java -jar watermark.jar -s [-o ]"); + System.exit(0); + } + + File f = null; + + for (int i=0; i