README update

This commit is contained in:
2026-01-16 13:49:34 +01:00
parent e92c8b7c09
commit 6654f7e758
7 changed files with 98 additions and 3 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
out/
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/

View File

@@ -1,11 +1,41 @@
# librewatmark
Tool to put a watermark on sensitive documents. Useful to mitigate identity theft etc.
Tool to put a watermark on sensitive documents. Useful to avoid identity theft.
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.
Example result:
(some image)
## Compilation
Install Java and Maven on your system. Then, in the root directory, generate a JAR file:
```
mvn clean package
```
You can then execute it using:
```
java -jar target/librewatermark-1.0-SNAPSHOT.jar
```
To create an executable for your platform, do:
```
jpackage --name librewatmark --input target --main-jar librewatermark-1.0-SNAPSHOT.jar --main-class org.whatever.Main --type TYPE
```
Where `TYPE` can be `deb` for Debian-based GNU/Linux distributions, `app-image` for the AppImage format, `rpm` for Fedora and friends, `dmg` for MacOS, and `exe` for Windows.
## Usage
Install Java on your system. Then run the jar file provided in Releases.
The program takes an input image, a watermark string using the `-s` option, and optionally an output filename with the `-o` option. When no output filename is specified, the default is the input filename + "-watermark".
```
$ librewatmark
librewatmark - libre watermark tool
Usage: <input file> -s <string> [-o <output file>]
```

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>librewatermark</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer>
<mainClass>org.whatever.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

26
pom.xml
View File

@@ -26,4 +26,30 @@
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.whatever.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: org.whatever.Main

BIN
test-watermark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
test.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB