• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How To Convert PNG To JPG Images On Linux Ubuntu, via Command Line

How To Convert PNG To JPG Images On Linux Ubuntu, via Command Line

By Sourabh / June 8, 2016 Category: How To, Ubuntu

How to convert Png to Jpg images on Ubuntu, via command line (Terminal commands). Use ImageMagick Convert command to convert PNG to JPG images on Ubuntu. Resize images on Ubuntu via command line (Terminal).

The convert program is a member of the ImageMagick suite of tools. Use it to convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.

  • SYNOPSIS
    convert [input-option] input-file [output-option] output-file

convert-command

Use any setting or operator as an output-option. Only a limited number of setting are input-option. They include: -antialias, -caption, -density, -define, -encoding, -font, -pointsize, -size, and -texture as well as any of the miscellaneous options. By default, the image format of `file’ is determined by its magic number. To specify a particular image format, precede the filename with an image format name and a colon (i.e. ps:image) or specify the image type as the filename suffix (i.e. image.ps). Specify ‘file’ as ‘-‘ for standard input or output.

How To Use Convert Command

To use the convert command, you must have installed ImageMagick app on your system. If not, run the following commands to install ImageMagick software on Ubuntu Systems.

imagemagick-ubuntu

Once installed, you can use the convert command to convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. See below for example usages of the command.

To get started, lets convert an image in the JPEG format to PNG. For this tutorial, we are using image file named Cake.PNG.

convert-use

To convert Cake.PNG to Cake.JPEG (Cake.JPG):

convert cake.jpg cake.png

To convert Cake.JPG to Cake.PNG:

convert cake.png cake.jpg

The convert command can also be used with more than 100 command options or parameters. Using the convert command you can resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Let us see some examples:

Reduce the image size before it is converted to the PNG format:

convert cake.jpg -resize 50% cake.png

You can combine multiple image-processing operations to produce complex results with improved quality.

Convert an image with a specific/fixed height and width in pixels. You can also use the convert command to convert the image to a specific width or height.

Convert an image to 400 pixels in width and 200 pixels in height:

convert cake.png -resize 400×200 cake.png

Resize Cake.PNG image to a width of 400 pixels:

convert cake.png -resize 400 cake.png

Resize Cake.PNG image to a height of 200 pixels:

convert cake.png -resize x200 cake.png

By default, the convert command will preserve the aspect ratio of the image. Using the additional parameters, the aspect ratio settings can also be changed.

Tags: Convert Command in Ubuntu, Convert Images Format on Linux, Convert Images Format on Linux Ubuntu, Convert Images Format on Ubuntu PNG To JPG, Convert PNG To JPG Images Ubuntu, Convert PNG To JPG Images Ubuntu 13.04, Convert PNG To JPG Images Ubuntu 14.04, Convert PNG To JPG Images Ubuntu 15.04, Convert PNG To JPG Ubuntu, How To Convert PNG To JPG Images Linux Command Line, How To Convert PNG To JPG Images On Linux, How To Convert PNG To JPG Images On Ubuntu, How To Convert PNG To JPG Images Ubuntu Command Line, How to use Convert Command in Ubuntu, ImageMagick Convert Command, ImageMagick Convert Command in Ubuntu, Linux Convert PNG To JPG, Linux Ubuntu Convert Images Format, Linux Ubuntu Convert PNG To JPG, Ubuntu 13.04 Convert PNG To JPG, Ubuntu 14.04 Convert PNG To JPG, Ubuntu 15.04 Convert PNG To JPG, Ubuntu Convert Images Format, Ubuntu Convert PNG To JPG

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap