Created
March 4, 2024 04:28
-
-
Save zamai/75fdac5ba4dbfc3b92c815189c80b2f8 to your computer and use it in GitHub Desktop.
convert photos jpeg to heic, using sips in Automator for quick action
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
quality_level="90" # Set quality to 90% | |
for f in "$@" | |
do | |
echo "Processing $f" | |
# Define the output filename by changing the extension to .heic | |
output_file="${f%.*}.heic" | |
# Convert JPEG to HEIC with specified quality using sips | |
sips -s format heic --setProperty formatOptions $quality_level "$f" --out "$output_file" | |
echo "Conversion and metadata copying complete for $f" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment