Photomarker is a simple CLI tool to add watermarks to photos. It allows to mark multiple photos by given size, location, and opacity.
Example usage to add the desired watermark to the photos in the current directory is as follows.
photomarker -dst=. -src=watermark.png -width=100 -height=100 -x=-50 -y=-50
-opacity=0.3 -out=marked_photos/
You can use the executable files under the builds directory by downloading the appropriate one for your system. If you want to access the tool globally you can add the executable to your working path.
If there is no suitable executable file for your system, you can obtain the executable file with the compiler of the Go language.
go get github.com/sschrs/photomarker
go build -o photomarker main.go # In directory of package
To see usage of args you can use -help flag.
photomarker -help
Argument | Usage |
---|---|
width | Specifies the width, in pixels, of the photo to be placed. Default: 60px |
height | Specifies the height, in pixels, of the photo to be placed. Default: 60px |
opacity | Opacity value of the photo to be placed. Min: 0, Max:1, Default: 0.5 |
out | If the replace argument is false, it specifies the destination path of the copied photos. Default: marked/ |
x | Specifies the x coordinate of the photo to be placed. If a negative value is entered, pixels from the lower right corner are counted. Default: -20 |
y | Specifies the y coordinate of the photo to be placed. If a negative value is entered, pixels from the lower right corner are counted. Default: -20 |
dst | Destination file or directory |
src | Source file to be used for markup |
- Specify the output format
- Replace feature