Low Orbit Flux Logo 2 F

Arch Linux JPG to PNG

If you are running arch linux and want to convert a jpg image to a png ( or the other way around ) you will be happy to learn that this is really easy.

You can convert a jpg to a png using the following ImageMagick command:

convert image.jpg image.png

You can do the reverse like this:

convert image.png image.jpg

Batch Convert JPG to PNG on Arch Linux

Mogrify is another ImageMagick command. It can do all sorts of things to an image. One of those things is converting between formats. Unless you are using the format flag, the original will be overwritten. This command has saved me HOURS of work.

You can convert all jpg files to png like this:

mogrify -format png *.jpg

You can also convert all png files to jpg like this:

mogrify -format jpg *.png

You can learn more about the mogrify command HERE.

ImageMagick Installation on Arch Linux

ImageMagick is a powerful, cross platform image processing tool. It allows you to do just about anything you could want to an image from the command line. It is an extremely powerful tool that can save you hours of work.

There is a good chance that you don’t already have ImageMagick installed. If this is the case you have little to worry about. You can install it with pacman.

sudo pacman -S libmagick

References