• 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

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

Linux Command To Check RAM Size In Ubuntu Terminal In GB

How To Install Proprietary Drivers In Linux Ubuntu Using Terminal

How To Shutdown Linux With A 15 Minute Delay And Message

Free AI Courses With Certificate For Beginners In India

Best AI Plugins For WordPress To Use In 2026

3 Commands To Check USB Connection In Linux Terminal

Linux Terminal Commands for Beginners With Examples

How To Password Protect A Folder In Linux Command Line

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

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