Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • How To Use Google Calendar Top Ten most wanted Tips Google Software/Tips
  • 8 Easy Raspberry Pi Projects For Beginners Networking
  • How To Teleport in Minecraft 2022 Gaming
  • Fix “Accessing iTunes Store” Message Stuck Issue iTunes
  • Three Keyboard Apps Worth Using Over Your Smartphone’s Default Smartphones
  • How To Rotate The Screen In Windows 10 Windows 10
  • how to calculate vat uk Cool Websites
  • How to Quickly Format SD Card on Mac OS X

Convert Images Between Formats via the Command Line in Ubuntu

Posted on October 9, 2020 By blog_786 No Comments on Convert Images Between Formats via the Command Line in Ubuntu

If you need to convert an image from one format to another, you can use GIMP for this, but there is an easier way. You can use ImageMagick, which allows you to convert images using the command line.

Install ImageMagick

ImageMagick may already be installed. You can check this in the Synaptic Package Manager. Select Administration | Synaptic package manager from the System menu.

Convert Images Between Formats via the Command Line in Ubuntu

In the quick search edit box in the Synaptic Package Manager window, enter imagemagick. Search results start showing as you enter your search term. If ImageMagick is already checked, the checkbox next to the program name will turn green, and you can skip to the “Converting an Image Using ImageMagick” section below.

Convert Images Between Formats via the Command Line in Ubuntu

If ImageMagick is not already installed, check the box to open the popup menu. Select the “Mark for installation” option from the menu.

– /

Convert Images Between Formats via the Command Line in Ubuntu

A yellow arrow appears above the checkbox next to imagemagick, indicating that it is checked for installation. Click the Apply button to proceed with the installation.

Convert Images Between Formats via the Command Line in Ubuntu

The summary screen displays a list of all changes that will be made. Click the Apply button.

Convert Images Between Formats via the Command Line in Ubuntu

The installation progress is displayed.

Convert Images Between Formats via the Command Line in Ubuntu

When the installation is complete, the Applied Changes dialog box opens. Click the Close button.

Convert Images Between Formats via the Command Line in Ubuntu

Select “Exit” from the “File” menu to close the Synaptic Package Manager.

Convert Images Between Formats via the Command Line in Ubuntu

Convert an image using ImageMagick

After installing ImageMagick, just use the convert command in a terminal window. For example, the following command converts a PNG file to a JPEG file.

$ convert sample.png sample.jpg

Converting an image to JPEG, however, sacrifices image quality in favor of file size. There is a –quality command switch that lets you specify the quality of the resulting .jpg file. You can set a value from 0 (lowest quality) to 100 (highest quality). Remember that the higher the quality (the higher the number), the larger the file size. Typically, a value between 60 and 80 is appropriate for most situations.

The following command converts sample.png to a JPEG image with quality 80.

$ convert –quality 80 sample.png sample.jpg

Convert Images Between Formats via the Command Line in Ubuntu

A JPEG file named sample.jpg is created in the same directory as the original .png file. There is a quick way to preview the converted image. The default image viewer in Ubuntu is called Eye of Gnome. Using Eye of Gnome, you can quickly view the following images: ani, bmp, gif, ico, jpeg, pcx, png, pnm, ras, svg, tga, tiff, wbmp, xbm and xpm.

To start Eye of Gnome from the command line, just type eog. So, to view the converted image file, enter the following command:

$ eog sample.jpg

Convert Images Between Formats via the Command Line in Ubuntu

The viewer opens with the specified image.

Convert Images Between Formats via the Command Line in Ubuntu

To close Eye of Gnome, choose Close from the File menu.

Convert Images Between Formats via the Command Line in Ubuntu

If you prefer to use the command line to perform tasks, click here to access a web page that provides a set of examples for using ImageMagick from the command line. Enjoy!

–

Share this:

  • Twitter
  • Facebook
Linux Tips

Post navigation

Previous Post: Cannot Run Windows Update on a Windows 7 PC?
Next Post: Stop Windows 7 from Automatically Installing Device Drivers

Related Posts

  • 7 Linux Commands Every Beginner Should Know Linux Tips
  • Create Your Own Live Video Streaming Server With Linux Linux Tips
  • Configure Ubuntu to Not Dim or Turn Off An Inactive Display Linux Tips
  • Find and Change Your Hostname in Ubuntu Linux Tips
  • A Beginner’s Ubuntu Linux Guide Linux Tips
  • How to Find, Download, and Install Custom Icons in Linux Linux Tips

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • 6 Best FTP Clients For Android
  • MailTag: Real-time Email Tracking, Made Easy
  • Here are the Top 10 highest paid YouTubers of 2017
  • Protect Your Facebook Account From Hackers (2017)
  • 4 Ways to Share WiFi Without Giving Away Your Password
DMCA.com Protection Status

Recent Posts

  • How to use Canva Docs to create documents online
  • PS4 won’t turn on but beeps? 9 Fixes Worth Trying
  • How to Create a Vision Board on Canva
  • How to Cancel Your Wall Street Journal (WSJ) Subscription
  • How to Fix Spotify Lyrics Not Showing Up

Recent Comments

  1. How to Cancel Your Wall Street Journal (WSJ) Subscription on How to Cancel Your New York Times Subscription
  2. How to Fix Spotify Lyrics Not Showing Up on How to Delete or Delete Downloads from Spotify
  3. 6 Best FTP Clients For Android on Disney Plus not working on Fire TV? Try These 8 Fixes
  4. Protect Your Facebook Account From Hackers (2017) on Top 5 Facebook Alternative Apps For iOS Devices
  5. 4 Ways to Share WiFi Without Giving Away Your Password on How to fix if PS5 Not Connecting to Internet?
  • How to turn off touch screen on dell laptop Computer Tips
  • Use Custom DNS Servers on Cellular in iOS with DNS Override iOS
  • How To Install Windows Applications in Linux Linux Tips
  • Best checkbook cover with calculator 2020

    Best checkbook cover with calculator 2020. 1 - YOOMALL Leather Checkbook Register Cover Holder Case with Pen Holder Slim Wallet Top Re

  • How to Transfer Windows 10 License to New Computer, Hard Drive, or SSD How-To
  • 6 Programs for Beginners to Create Your Own Video Games Software Reviews
  • How to Use Python on Windows How-To
  • How to View Saved WiFi Passwords on Windows 7, 8, & 10 Computer Tips

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version