

When the quality is greater than 90, then the chroma channels are not downsampled.

The default is to use the estimated quality of your input image if it can be determined, otherwise 92. This option sets the width of the output image, as for the height, it will be selected automatically to maintain the original aspect ratio of the image.įor the JPEG and MPEG image formats, quality is 1 (lowest image quality and highest compression) to 100 (best quality but least effective compression). To specify the image size in pixels, use the -scale PIXELS option. This will affect the clarity of the image and the ability to see fine details. Increase the level of image compression (for images compressed with loss of quality, this will lead to a deterioration in the appearance of the image, for images compressed without quality loss, this will mean longer processing of the image)ģ. Select lossy image encoding format (JPEG)Ģ. You can reduce the image size in several ways:ġ. You can also convert video formats avi, 3gp, webm, wmv, flv, mkv, mpg, webm, m2v, m4v, mov, mp4, mpeg and others to GIF files. 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). The following command will convert the image.png file to JPG format and save the new image to the image.jpg file: The program will automatically detect the original image format.Īs for the output file format, it is determined by the extension specified in the previous command. Note: if you get an error that the “ magick” command was not found, then use the “ convert” command instead. To convert one image to any other, run the following command:
CONVERT IMAGE FORMAT LINUX HOW TO
How to convert images on the Linux command line
CONVERT IMAGE FORMAT LINUX FULL
You can view the full list of supported formats with the commandĪlso at the end of the article is a table with a complete list of supported file formats and their brief description. The “ convert” and “ magick” utilities from the ImageMagick package do an excellent job of converting images (JPG and other formats).įor 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. Linux has ImageMagick, which supports hundreds of image formats and can convert an image from any format to any other.
