{"id":1476,"date":"2021-12-16T13:15:39","date_gmt":"2021-12-16T10:15:39","guid":{"rendered":"https:\/\/files2.tojikon.net\/files-cloud\/2021\/06\/24\/how-to-convert-png-to-jpg-on-linux\/https:\/\/files2.tojikon.net\/files-cloud\/2021\/06\/24\/how-to-convert-png-to-jpg-on-linux\/"},"modified":"2021-12-16T13:15:39","modified_gmt":"2021-12-16T10:15:39","slug":"how-to-convert-png-to-jpg-on-linux","status":"publish","type":"post","link":"https:\/\/tojikon.net\/en\/1476-how-to-convert-png-to-jpg-on-linux\/","title":{"rendered":"How to convert PNG to JPG on Linux"},"content":{"rendered":"<section id=\"related_posts\">\n<div class=\"block-head\">\n<h3>Related Articles<\/h3>\n<\/div>\n<\/section>\n<p>Got some PNG image files you need to convert to JPG lying around on your Linux PC? Don\u2019t know the first thing about converting image formats? We can help! Follow along with this guide as we go over how to convert PNG image files to JPG on Linux!<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-404882 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux.png\" alt=\"convert PNG to JPG on Linux\" width=\"1201\" height=\"778\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux.png 1201w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux-2.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux-3.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux-4.png 768w\" sizes=\"(max-width: 1201px) 100vw, 1201px\"\/><\/p>\n<h2>Installing ImageMagick on Linux<\/h2>\n<p>There are many ways to convert PNG files to JPG files on Linux, but the fastest and best way is to use ImageMagick, a command-line utility that can convert images, including PNG ones.<\/p>\n<p>ImageMagick finds its way on many Linux users\u2019 PCs, as many of the apps that people use tend to rely on ImageMagick one way or the other. However, we still need to go over how to install this software on Linux before continuing.\u00a0<\/p>\n<p>The ImageMagick program is supported on all Linux operating systems. To start the installation, open up a terminal window by pressing\u00a0<strong>Ctrl + Alt + T\u00a0<\/strong>on the keyboard. Or, search for \u201cTerminal\u201d in the app menu and launch it that way.<\/p>\n<p>Once the terminal window is open, follow along with the installation instructions that correspond to the Linux operating system that you use on your PC.<\/p>\n<h4>Ubuntu<\/h4>\n<p>On Ubuntu Linux, you can install the ImageMagick application on your computer with the following\u00a0<strong>apt install\u00a0<\/strong>command below.<\/p>\n<pre>\nsudo apt install imagemagick\n<\/pre>\n<h4>Debian<\/h4>\n<p>If you\u2019re using Debian, you\u2019ll be able to get a fairly recent version of ImageMagick up and running on your system with the\u00a0<strong>apt-get install\u00a0<\/strong>command below.<\/p>\n<pre>\nsudo apt-get install imagemagick\n<\/pre>\n<h4>Arch Linux<\/h4>\n<p>Those using Arch Linux will be able to get the ImageMagick application up and running on their systems by entering the\u00a0<strong>pacman\u00a0<\/strong>command below.<\/p>\n<pre>\nsudo pacman -S imagemagick\n<\/pre>\n<h4>Fedora<\/h4>\n<p>Are you using Fedora Linux? If so, you\u2019ll be able to install ImageMagick on your computer with the use of the following\u00a0<strong>dnf install\u00a0<\/strong>command below.<\/p>\n<pre>\nsudo dnf install imagemagick\n<\/pre>\n<h4>OpenSUSE<\/h4>\n<p>Are you running OpenSUSE Linux on your computer? If so, you\u2019ll be able to get the ImageMagick program working on your system with the following\u00a0<strong>zypper install\u00a0<\/strong>command below.<\/p>\n<pre>\nsudo zypper install imagemagick\n<\/pre>\n<h4>Generic Linux<\/h4>\n<p>If you\u2019re using a Linux operating system that we haven\u2019t covered in the installation, guide, do not worry. Chances are, you\u2019ll still be able to get ImageMagick up and running just fine. Check your package manager (the terminal command you use to install software) for the \u201cimagemagick\u201d package and install it.<\/p>\n<p>Alternatively, if you cannot find the \u201cimagemagick\u201d package on your system and need to install it,\u00a0 follow along with the ImageMagick website\u2019s official source code instructions. It walks you through everything you need to know to build it from scratch.<\/p>\n<h2>Using ImageMagick to convert PNGs to JPGs<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-404883 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux-1.png\" alt=\"\" width=\"1200\" height=\"629\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux-1.png 1200w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux-5.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux-6.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux-7.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\"\/><\/p>\n<p>ImageMagick can be used to convert images through the terminal. In this guide, we\u2019ll show you how to use it to convert PNGs to JPG files. To start, launch a terminal window by pressing\u00a0<strong>Ctrl + Alt + T<\/strong>, or by searching for \u201cTerminal\u201d in the app menu.<\/p>\n<p>Once the terminal window is open, follow the instructions below depending on how many images you wish to convert at a time.\u00a0<\/p>\n<h3>Convert a single image<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-404882 size-full\" src=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux.png\" alt=\"\" width=\"1201\" height=\"778\" srcset=\"https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux.png 1201w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux-2.png 300w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux-3.png 1024w, https:\/\/files2.tojikon.net\/files-cloud\/wp-content\/uploads\/2021\/12\/how-to-convert-png-to-jpg-on-linux-4.png 768w\" sizes=\"(max-width: 1201px) 100vw, 1201px\"\/><\/p>\n<p>To convert a single image, start by using the\u00a0<strong>CD\u00a0<\/strong>command to move into the folder where your PNG image file is located. In this example, we\u2019ll use \u201cPictures.\u201d<\/p>\n<pre>\ncd ~\/Pictures\/\n<\/pre>\n<p>Once in the folder, use the\u00a0<strong>mogrify\u00a0<\/strong>command with the\u00a0<strong>-format jpg\u00a0<\/strong>command-line option.<\/p>\n<pre>\nmogrify -format jpg MY-PNG-FILE.png\n<\/pre>\n<p>After writing in the above\u00a0<strong>mogrify\u00a0<\/strong>command, ImageMagick will convert your file to a JPG, with the same file name, in the same folder as the PNG file.\u00a0<\/p>\n<h3>Convert multiple images<\/h3>\n<p>Along with converting single images in ImageMagick, it is also possible to convert multiple images at a time. To start, use the\u00a0<strong>CD\u00a0<\/strong>command to move into the folder in which your multiple PNG files are located. Once again, in this example, or PNG files will be located in the \u201cPictures\u201d folder.<\/p>\n<p>Using the\u00a0<strong>CD\u00a0<\/strong>command, move into the \u201cPictures\u201d folder with the terminal.\u00a0<\/p>\n<pre>\ncd ~\/Pictures\n<\/pre>\n<p>Once inside of the \u201cPictures\u201d folder, use the\u00a0<strong>mogrify\u00a0<\/strong>command and the command-line option\u00a0<strong>-format jpg<\/strong>, so that ImageMagick knows what format to use. Then, specify the files to convert. As we are converting multiple files, use the\u00a0<strong>*\u00a0<\/strong>symbol.<\/p>\n<p>The * symbol is a wildcard. Long story short, the wildcard allows you to tell a command to look for every single file with a particular file type. In this case, we can use it to convert every PNG file.<\/p>\n<pre>\nmogrify -format jpg *.png\n<\/pre>\n<p>When the conversion finishes, you\u2019ll see various JPG files with the same names as your PNG files.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Related Articles Got some PNG image files you need to convert to JPG lying around on your Linux PC? Don\u2019t know the first thing about converting image formats? We can help! Follow along with this guide as we go over how to convert PNG image files to JPG on Linux! Installing ImageMagick on Linux There &hellip;<\/p>\n","protected":false},"author":1,"featured_media":1477,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21],"tags":[33],"_links":{"self":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1476"}],"collection":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/comments?post=1476"}],"version-history":[{"count":0,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/posts\/1476\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media\/1477"}],"wp:attachment":[{"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/media?parent=1476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/categories?post=1476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tojikon.net\/en\/wp-json\/wp\/v2\/tags?post=1476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}