4 Ways to Batch Convert Your PNG to JPG and Vice-Versa

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

8 Responses

  1. Christopher Lee says:

    Perhaps the commenter’s name (see June 20 at 3:13am) should be moderated.

    Since files have existed, certain characters have been forbidden in filenames, depending on the operating system. Spaces used to be universally forbidden. For some time now, forbidden characters have been re-admitted, perhaps as part of a struggle to keep commercial operating systems incompatible with others.

    I know it’s off-topic (except that it causes trouble with a solution proposed here), but please could someone point us to an up-to-date review of file naming?

    Finally, I may have been too brief when mentioning IrfanView. Its GUI presentation provides many more options than the proposed command-line solutions; for example you can set the maximum output file size and choose the compression of jpeg files.

    The article could perhaps have mentioned that good practice is to keep a master png (or tiff) file from which you make lossy jpegs only as required for particular purposes. You may need to start in reverse by making the png from the original jpeg if that is all your camera provides. I do a website where amateur or semi-professional authors present their offerings; despite the rise of digital photography, hardly anybody seems to understand the basic rules and I have to reject many jpegs that have been processed one time too many.

    • Aaron Kili says:


      We will check out IrfanView. “Keeping a master png (or tiff) file from which you make lossy jpegs only as required for particular purposes”, is really worth mentioning, which we kind of forgot to point out in the article.

      Many thanks for the remarks.

  2. U R SHit says:

    Fails horribly if there are spaces in the filename. garbage.

    • Aaron Kili says:


      There is a special way for specifying filenames with spaces in the command line, using the \ character before space in file name. Or else, rename the filenames to remove the spaces.

  3. Aaron Kili says:


    Sure, its a much easier way. Thanks for sharing with us.

  4. Greg P says:

    Using mogrify for batch processing is quite simple:

    mogrify -format jpg *.png

    This creates new versions of your files in jpg format, while leaving your pngs intact.

  5. Christopher Lee says:

    I use the brilliant, free and easy IrfanView. The FAQ says:

    Q: Can I use IrfanView on Linux?
    A: Yes. There is no native-Linux version of IrfanView. However, you can use IrfanView in conjunction with Linux programs like WINE, Windows Linux emulators and Linux-based virtual machines. Take the ZIP version of IrfanView and unzip it or copy your existing Windows IrfanView folder to Linux. This is easier because the installer may need additional Windows DLLs to run. See instructions on: IrfanView on Linux with Wine

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.