How to resize images with the terminal using ImageMagick

Hi Folks,

In this post I cover how to resize images easily with the terminal using ImageMagick. We cover 2 scenarios. The first is if you want to maintain aspect ratio while the second is if you want the resulting image to have a specific width and height, regardless of aspect ratio.

Resizing Images while maintaining Aspect Ratio

You can use a command like

convert -resize 1024X768  source.png dest.jpg

 

Resizing Images without locking Aspect Ratio

The command is similar to the above except that you need to add !. Here is an example.

convert -resize 1024X768!  source.png dest.jpg

That’s all for now. Till next time, happy graphics manipulations.

Getting Dandy with DNF

Hi Folks,

In this post I’ll talk briefly about an interesting tool called DNF.

Recently I was trying to install dependencies in a Red Hat linux docker image and ran into issues using yum. After consulting with a very knowledgeable colleague, I learnt that I could resolve the problem by using DNF. I tried DNF and low and behold! the problem was solved. This got me curious about DNF.

So, what is DNF? DNF is an acronym for Dandified YUM. It is a command-line package manager for Red Hat-based linux distributions.

It was created to replace yum due to perceived deficiencies in yum, including poor performance, high memory usage and slowness in resolving dependencies. DNF has been the default package  manager since Fedora 22 in 2015 and Red Hat Enterprise Linux 8.

That’s all for now. Till next time, happy software development.

Sources

DNF (software). Wikipedia. https://en.wikipedia.org/wiki/DNF_(software)#cite_note-RHEL8news-12