How to convert images to any formats in Linux (SOLVED)
July 13, 2022
Universal image converter for Linux
Linux has ImageMagick, which supports hundreds of image formats and can convert an image from any format to any other.
The “convert” and “magick” utilities from the ImageMagick package do an excellent job of converting images (JPG and other formats).
For details on installing ImageMagick, including which dependencies need to be installed to support the maximum number of formats, see the article: ImageMagick guide: installing, using, and troubleshooting.
You can view the full list of supported formats with the command
magick -list format
Also at the end of the article is a table with a complete list of supported file formats and their brief description.
How to convert images on the Linux command line
To convert one image to any other, run the following command:
magick PICTURE RESULT
Note: if you get an error that the “magick” command was not found, then use the “convert” command instead. An explanation will be given below.
The program will automatically detect the original image format.
As for the output file format, it is determined by the extension specified in the previous command.
For example:
magick IMAGE.jpg RESULT.png
The following command will convert the image.png file to JPG format and save the new image to the image.jpg file:
magick image.png image.jpg
You can also convert dynamic images (such as GIF files) to video clips (avi, 3gp, webm, wmv, flv, mkv, mpg, webm, m2v, m4v, mov, mp4, mpeg and others).
You can also convert video formats avi, 3gp, webm, wmv, flv, mkv, mpg, webm, m2v, m4v, mov, mp4, mpeg and others to GIF files.
How to compress an image when converting
For information on how to convert and reduce the size of an image at the same time, see the article: How to reduce image size. Bulk photo scaling and resizing on the command line
Convert images to all formats online
If you do not want to install the ImageMagick package, then you can use online image conversion to any format. This is a free online service, you just need to specify the image to be converted and select the desired format of the new file.
Links:
- Online service “Universal Image Converter”: https://suip.biz/?act=convert-any-image
- Mirror: https://w-e-b.site/?act=convert-any-image
- Online service to convert PDF to JPG: https://suip.biz/?act=convert-pdf-to-jpg
- Online JPG to PDF conversion service: https://suip.biz/?act=convert-jpg-to-pdf
Continue reading: How to convert a large number of images to another format
Related articles:
- ImageMagick guide: installing, using, and troubleshooting (100%)
- How to check JPG quality level (SOLVED) (100%)
- How to reduce image size. Bulk photo scaling and resizing on the command line (100%)
- How to convert a large number of images to another format (100%)
- The structure of the magick command (ImageMagick) (100%)
- How to trim a video and how to split a video into multiple files without re-encoding in Linux (RANDOM - 50%)