To post images in my blog-posts for my documentation website i have to convert the images to an usable image extension. When importing photo’s i took with my phone (Iphone 11), the original extension is *.HEIC. An usable extension would be jpeg. Ideally, i want the images to have a small file size.

Screenshot-01

I could convert the images using Adobe Lightroom, but this would be a rather dramatic program/workflow for such a simple task. I can do better than this. I watched the lecture about Computer-aided Design, and came across Imagemagick. Imagemagick is a lightweight command line-based software for processing images.

To install Imagemagick i launched terminal and ran the following commands. Note: I already have Homebrew installed from installing Jekyll and Ruby

brew install imagemagick
brew install ghostscript

Using this tutorial i tried the display command.

cd ~/waag/site/hazalates.github.io/assets/images/2022-03-07-kombucha
display *.HEIC

It should give me the only GUI of Imagemagick, instead i got an error message.

display: delegate library support not built-in '' (X11) @ error/display.c/DisplayImageCommand/1898.

I googled the issue and a lot of steps need to be taken to resolve this issue. Because i want save time using Imagemagick instead of spending more time setting up Imagemagick i googled for another solution.

Apparently since macOS Monterey‌ my mac has a build-in function for converting images.

Screenshot-02

Screenshot-03

Still wanting to give Imagemagick another shot i decided to not use the GUI, but use a command instead.

mogrify -format jpg *.HEIC

I compared the file sized of the files converted by Mac and Imagemagick.

Screenshot-04

TO DO: Trying different file size compressions with Imagemagick, since the file sized are still very big. I do want to use Imagemagick since i have more control over the outcome.

Ps. n=1; for file in *; do mv “$file” “Picture $n”; let n++; done

Using this command i can change the filenames of the images all at once.