My wife’s apple iPhone X saves images she captured with her camera as .heic format1 , a relatively new file format that compresses high quality images and I needed a way to convert these type of files to .jpeg (which apparently dates back to 1992) so that they can be uploaded to my blog and eventually rendered by your browser.
After some googling, I discovered that my MacBook ships with the sips command line (scriptable image processing system) and the tool provides all the functionality I need. Each image that sips process takes about a second so that’s not too bad when bulk converting photos.
$ sips -s format jpeg --resampleWidth <resolution> <source> --out <destination>
Below is an example of the command that I ran to convert images for my blog, converting the image to a minimum of 1200 pixels (in width).
% sips -s format jpeg --resampleWidth 1200 IMG_1043.HEIC --out 2020-09-15-elliotts-nuggets.jpeg
I’m Matt Chung. I’m a software engineer, seasoned technology leader, and father currently based in Seattle and London. I love to share what I know. I write about topic developing scalable & fail-safe software running in the AWS cloud, digital organization as a mechanism for unlocking your creativity, and maximizing our full potentials with personal development habits.View all articles