photoprep: make a bit more readable
This commit is contained in:
parent
477b5244d5
commit
2e1ebf100f
@ -28,10 +28,14 @@ for file in ${@}; do
|
||||
newfile=photoprep/${file##*/}
|
||||
newfile=${newfile%.*}.${format}
|
||||
local exif_json=$(mktemp --suffix='.photoprep.json')
|
||||
|
||||
# write select EXIF data to temporary file
|
||||
exiftool -json ${file} | jq ${jq_filter} | grep -v null > ${exif_json}
|
||||
magick -quality ${quality} ${file} -auto-orient -strip -resize ${size} ${newfile}
|
||||
# add EXIF data to new (scrubbed) file
|
||||
exiftool -json=${exif_json} -quiet -overwrite_original ${newfile}
|
||||
rm ${exif_json}
|
||||
|
||||
print -n '.'
|
||||
done
|
||||
print
|
||||
|
Loading…
x
Reference in New Issue
Block a user