Great question — answering as the UphillTech team:
--raw writes a PNG-encoded stream to standard output. The > in your script only chooses where those bytes go: changing the filename to .jpg would still leave you with PNG data. To save JPEG with a chosen quality, pipe that stream through ImageMagick 7: #!/bin/bash set -o pipefail dir="$HOME/Pictures/flameshots" mkdir -p "$dir" || exit 1 file="$dir/$(date '+%Y-%m-%d_%H-%M-%S').jpg" flameshot full --raw | magick png:- -background white -alpha remove -alpha off -quality 85 "$file" png:- tells ImageMagick to read PNG from stdin; the output filename selects JPEG. 85 is an example JPEG quality setting, not a percentage of the original image quality. The background/alpha options give any...
Full answer by Андрей: https://superuser.stackexchange.com/a/1941311 (CC BY-SA 4.0).
Need it done for your business? UphillTech.