Archives For png

This simple tutorial will show you how to convert PNG to JPG in Ubuntu, so that it reduce the memory size and speed up loading image time.

1.) Install the required package by running below command in terminal:

sudo apt-get install imagemagick

2.) Then you can convert an .png image to .jpg format via below command. It takes “ubuntuhandbook.png” in the current directory and creates a JPEG image from it.

convert ubuntuhandbook.png ubuntuhandbook.jpg

You can also specify a compression level for JPEG images.

convert ubuntuhandbook.png -quality 90 ubuntuhandbook.jpg

3.) To convert all PNG files into JPEG files with that same filename but a different suffix. However be warned that if existing file with the same name will be over-written.

mogrify -format jpg *.png