Version 1.0.0
Inko is a command-line tool that allows you to add custom text or Exif (Exchangeable Image File Format) data to an image. You can use it to annotate your images with various information or labels. Can be used as converter for JPG
and PNG
format
java -jar target/InkoCli-1.0-SNAPSHOT.jar -p data/fg.jpg -o data/output/fgo -fs 35 -f "z003" -fw bold -bg "#80FFFFFF" -t "Life is like a box of chocolates. You never know what you're gonna get." -po c -sh
To build Inko, you need:
- Java 17
- Java Development Kit (JDK)
- Maven
Inko is a Java program that can be built using Maven. Follow the steps below to compile your Java code, package it into a JAR file, and build your project using Maven.
To build the program and is tests create new Maven configuration with this running options (Intellij):
dependency:resolve clean compile package
or use the terminal with these commands
mvn dependency:resolve
mvn clean compile package
target/InkoCli-1.0-SNAPSHOT.jar [OPTIONS]
-
-p, --imagePath PATH
Specify the path to the input image. -
-o, --output PATH
Specify the output path and file name (without extension) for the overlaid image. (Default: OverlaidImage) -
-of, --outputformat FORMAT
Specify the output image format (jpeg, png, gif). (Default: jpeg) -
-sh, --show
Show the overlaid image after processing.
-
-t, --text TEXT
Specify text to overlay on the image. You can use this option multiple times to add multiple text. -
-d, --date
Get the date of the image from EXIF. -
-df, --dateformat FORMAT
Set the format of the date. -
-gmt, --gmt OFFSET
Set the GMT (Greenwich Mean Time) offset. -
-cm, --cammodel
Get the model of the camera that took the image. -
-gps, --gpslocation
Get the GPS location of the image. -
-is, --imagesize
Get the size of the image in pixels from EXIF. -
-s, --sep SEPARATOR
Specify the separator for data when adding Exif values.
-
-f, --font FONT
Specify the font to be used for text overlay. (Default: Arial) -
-fw, --fontwidth WIDTH
Specify the font width (bold, italic, plain). (Default: bold) -
-fs, --fontSize SIZE
Specify the font size in pixels. (Default: 50) -
-fc, --fontcolor COLOR
Specify the font color in the format #AARRGGBB (e.g., #ff2e00ff). Specify the font color in the format #AARRGGBB (e.g., #ff2e00ff). -
-bg, --backgroundcolor COLOR
Specify the background color in the format #AARRGGBB. -
-po, --position POSITION
Specify the position of the overlaid text. Options include l, r, b, t, c, lt, rt, lb, rb. (Default: rb) -
-m, --margin MARGIN
Specify the margin of the overlaid text (default: 10)
-
-cr, --credits
or simply run the program without arguments
Show program credits. -
-h, --help
Show program help and description. -
-V, --version
Print version information and exit.
-
Overlay text on an image:
java -jar target/InkoCli-1.0-SNAPSHOT.jar -p data/img.jpg -t "What does the cow say ?" -po c -fc "#FFFF0000" -fs 150 -bg "#80FFFF00" -o data/output/cow -sh
this commande launch
target/InkoCli-1.0-SNAPSHOT.jar
, getdata/img.jpg
, and apply a textual-t "What does the cow say ?"
at the center of the image-po c
with à red font color opacity 100%-fc "#FFFF0000"
and size 150px-fs 150
with a yellow background opacity 50%"#80FFFF00"
. The output file name is output.jpg-o data/output/cow
and the image will pop up after the process-sh
before after -
Show program credits:
java -jar target/InkoCli-1.0-SNAPSHOT.jar -cr
-
Overlay the date on an image:
java -jar target/InkoCli-1.0-SNAPSHOT.jar -p data/img.jpg -d -bg "#80FFFFFF" -o output.jpg -sh
-
Get the camera model, GPS location (if contained in EXIF data) and the image size included personal texts:
java -jar target/InkoCli-1.0-SNAPSHOT.jar -p data/img.jpg -t "Camera: " -cm -t "GPS : " -gps -is -bg "#80FFFFFF" -o output.jpg -sh
-
Convert
PNG
toJPG
(transparent background becomes white)java -jar target/InkoCli-1.0-SNAPSHOT.jar -p data/noBackgroud.png -o data/output/backgroud -of jpeg
consult this section in dark mode
before after -
Remove semi transparent backgroung from
PNG
toJPG
java -jar target/InkoCli-1.0-SNAPSHOT.jar -p data/semiTransparent.png -o data/output/noTransparency -of jpeg
before after
Metadata-Extractor is a Java library for reading metadata from media files. https://github.com/drewnoakes/metadata-extractor
Picocli aims to be the easiest way to create rich command line applications that can run on and off the JVM : https://github.com/remkop/picocli
Documentation on https://picocli.info/