I don't know a lot of the particulars behind the newer HEIC format that my iPhone sometimes uses. Sometimes the pictures wind up being in PNG format, but I haven't taken the time to see if there's a setting. I guess I can do that right now. Of course there is:
You can get here by going to General > Camera and choose Most Compatible. Looks like they feel like HEIC will save some space, so that's the trade off. Anyhow, I'd rather not change it and have to watch it as I've seen updated change settings at times.
I wrote a quick function or alias to add to my bash login configuration file so that no matter where I am in the filesystem, I can run this command and it will find any HEIC (or heic) files and convert them to jpeg. It uses Mac's built in program called "Sips" to do the convert. To use this, you should have a file called .bashrc or .bash_profile in your home directory. Open it up and put in this code:
heic() {
DIR=$(pwd)
for f in $DIR/*.HEIC; do
NEW=$(basename "$f" .HEIC).jpg
if [ ! -f "$NEW" ]; then
sips "$f" --setProperty format jpeg --out "$NEW";
if [ "$1" == "kill" ]; then
rm "$f";
fi;
fi;
done
DIR=$(pwd)
for f in $DIR/*.heic; do
NEW=$(basename "$f" .heic).jpg
if [ ! -f "$NEW" ]; then
sips "$f" --setProperty format jpeg --out "$NEW";
if [ "$1" == "kill" ]; then
rm "$f";
fi;
fi;
done
}
What this does is create a function that you can call from the command line. It looks in the present working directory that you're in for any files that have the .HEIC extension. It looks to see if there's a JPEG version with the same name, and if not, runs the sips command and outputs the jpeg.
If you add the word "kill" to the end of the command, it will also delete the HEIC file once the convert is complete.
This code does repeat, and there are ways to do this in one loop, but I got lazy and noticed I had some lower case heic files so I just copypastad.
// to covert all files in the current directory
$ heic
// to covert all files and remove the old ones
$ heic kill
Enjoy.