-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Add watermark #158
Comments
I would also vote for this one. Very nice to be able to configure a watermark (either text, transparent png) to be put on top of the captured screenshot |
+1. This would be very useful indeed. |
Maybe mine a bit different, but it still has watermark concept, but what I need is timestamp, like Android timestamp watermark |
@fmiqbal I think adding a specialized timestamp feature would be bloat. If you are on linux, perhaps you could make a script to generate an image with a timestamp, save it to a file, then make flameshot use it as a watermark. Or, if we implement a plugin API, someone can create a plugin that will do this. All of this applies only after we implement the watermark feature of course. |
@fmiqbal A simple script like this should get you started:
|
@fmiqbal If you are on linux and have ImageMagic installed you can do the following for an already saved file: montage -geometry +0+0 -background white -label "$(stat inputfile.png --printf=%y)" inputfile.png outputfile.png basically it gets the file ( if applied on this image you will get: If you want it to be a real watermark you can use this: #!/usr/bin/env bash
# a script based on https://amytabb.com/til/photography/2021/01/23/image-magick-watermark/
INPUT_FILE="aa.png"
OUTPUT_FILE="aa2.png"
WM_FONT="NewCenturySchlbk-Italic"
WM_FONT_SIZE="50"
# get the modification time
INPUT_FILE_MODIFICATION_TIME=$(stat "${INPUT_FILE}" --printf=%y)
# create the watermark
convert -size 320x100 xc:transparent \
-font "${WM_FONT}" \
-pointsize ${WM_FONT_SIZE} \
-fill black -annotate +24+64 "${INPUT_FILE_MODIFICATION_TIME}" \
-fill white -annotate +26+66 "${INPUT_FILE_MODIFICATION_TIME}" \
-fill transparent -annotate +25+65 "${INPUT_FILE_MODIFICATION_TIME}" \
"/tmp/wm_front.png"
convert -size 320x100 xc:black \
-font "${WM_FONT}" \
-pointsize ${WM_FONT_SIZE} \
-fill white -annotate +24+64 "${INPUT_FILE_MODIFICATION_TIME}" \
-fill white -annotate +26+66 "${INPUT_FILE_MODIFICATION_TIME}" \
-fill black -annotate +25+65 "${INPUT_FILE_MODIFICATION_TIME}" \
"/tmp/wm_mask.jpg"
composite -compose CopyOpacity "/tmp/wm_mask.jpg" "/tmp/wm_front.png" "/tmp/wm_final.png"
composite "/tmp/wm_final.png" "${INPUT_FILE}" -gravity southeast -geometry +10+10 "${OUTPUT_FILE}"
if applied on this image you will get: |
Love this, results is good, I'll grab some file watcher to automate the process my command goes like nice on black, good enough on white Thanks, much appreciated |
As a blogger, basically I use screenshots, but some people like to steal pictures. So I hope the watermark function can be on flameshot plan. Although primitive watermark is easy to implement, I wanted to make it customizable, not just text, even my own logo or any other images, and can resize and reshape these watermarks.
Off-topic, flameshot's arrows, draw lines, draw rectangles/ellipses, blur, etc., must be drawn once, and if you do not do well, you can not make any adjustments on the original basis.
The text was updated successfully, but these errors were encountered: