How to Convert Images in CMD.EXE

It looks like not many users are aware that they can convert image files of different formats (RAW, BMP, GIF, PNG, JPEG, TIFF, etc.) to other formats by using our applications via the CMD.EXE command line. Almost everybody is satisfied with this simple and familiar method: Run an application, drag and drop selected files or folders onto its window, and then click the “Convert” button. That’s all, the job is done!

automate image conversion via command-line

But if you need to automate the file conversion process, convert files on schedule, or use graphic converters with your own scripts or apps, the ability to run programs with specific parameters from the CMD.EXE command line (also known as “console”, “prompt” or “shell”) becomes an indispensable tool for an experienced user. I’ll tell you about our applications’ brand-new, flexible, and powerful CLI (command-line interface) syntax by using a few examples.

It should be noted that we’ve implemented command line support in our software relatively long ago. Actually, initially only very basic functionality was supported. But with the recent release, everything has changed very much for the better. We have fully redesigned the old CLI syntax. As a result, now almost all file-conversion features and parameters are available if you execute our applications using the command line.

By the way, you can find a special, console-based application, with the “cmd” suffix in the filename (for example, png2jpgcmd.exe), in the distribution package and in the installation folder (usually “C:\Program Files\Easy2Convert Software\XXX to XXX\”) of our software. When you automate the file conversion process or call our app from external scripts, we recommend using this console-based application.

Enough about technical stuff, let’s take a look at the new command-line syntax’s core features using some real use cases. Launch the CMD.EXE console (I’m using Windows 7, but you can also use Windows XP, Vista, or 8).

How to convert BMP to JPG in CMD.EXE?

Suppose you have a BMP file named picture.bmp, which you need to convert to the JPEG format. Go to the folder with BMP to JPG installed, and execute the following command:

bmp2jpg.exe -i c:\tmp\picture.bmp -o d:\converted\ -c jpg

The result: The original BMP file was converted to the JPEG format, and the new JPEG file was saved to the D:\converted\ folder.

How to convert a whole Kodak Photo CD to TIFF in CMD.EXE?

Surely many photographers and graphic designers keep a few old Photo CDs somewhere in their garage or basement. As far as I remember, Kodak Photo CDs were very popular some twenty years ago. It’s understandable that people would like to convert all these old photo collections to a more up-to-date image format, such as TIFF. You can do that easily by executing just one command in the command line:

pcd2tiffpro.exe -i d:\ -o c:\photocd\ -c tiff

The result: Our application scanned the whole Kodak Photo CD in the D:\ DVD drive, converted all found PCD files to the TIFF format, and saved the new TIFF files to the C:\photocd\ folder.

How to save all frames from GIF animations to PNG?

Our GIF converters let you easily extract all frames from animated GIF files and save these frames to a different image format, such as PNG. So let’s complicate the task a little bit. Suppose you need to process all GIF files in different folders on different disks, and do it all at once, using only one command in CMD.EXE.

That’s quite possible, though you need to do some preparations. Create a list of files and folders, and save it as a text file named list.txt:


Now call our application from the command line:

gif2image.exe -i c:\list.txt -o d:\converted\ -c png

The result: All GIF files from the list were converted to the PNG format, and all frames were extracted from animated GIF files and saved to the D:\converted\ folder.

How to resize a PSD image and save the result to BMP in CMD.EXE?

Suppose that in addition to converting an image file from one format to another, you also need to resize the image to 600×400 px, and to flip it horizontally. The result must be an 8-bit BMP file with RLE compression. To do this conversion, use additional options:

psd2image.exe -i c:\design.psd -o d:\tmp\ -c bmp --width=600 --height=400 --flip-horizontal --bmp-bpp=8 --bmp-compression=rle

The result: The Adobe Photoshop PSD image was resized to 600×400 px, flipped horizontally, and saved as an 8-bit BMP file with RLE compression in the D:\tmp\ folder.

How to batch-convert all RAW files on a USB flash drive to JPEG in CMD.EXE?

This use case will probably catch the interest of photographers. First remove the flash drive from the camera, and copy/sync the RAW files to a folder on your computer. Now you need to batch-convert all RAW (CRW, CR2, DCR, NEF, RAF, etc.) files to an image format suitable for the Web, such as JPEG with the best quality. You also need to resize the images to 800×600 px, and to increase their brightness and contrast.

raw2jpgpro.exe -i d:\raw\ -o c:\jpeg\ -c jpg --width=800 --height=600 --brightness=30 --contrast=20 --jpg-quality=100

The result: All RAW images were resized to 800×600 px, and their brightness and contrast were increased; the files were converted to JPEG with the best quality and saved to the C:\jpeg\ folder.

Hopefully, these examples of using our converters via the CMD.EXE command line will come in handy. To find a complete list of supported command-line options and more examples, please refer to the user documentation included in our software.

38 thoughts on “How to Convert Images in CMD.EXE

  1. Katherine

    If I’m invoking bmp2jpg.exe via cmd it flashes and disappears right away. The original bmp files have been converted though…

  2. zoe

    Hello, I was able to convert all my gif images with your advice automatically! That’s right AUTOMATICALLY, just sit and watch, thanks a lot!

  3. Donna

    I must confess CMD usage dramatically increased my productivity. Not only image conversion, but other repetitive tasks I have to do.

  4. Sherry

    Hi, my name is Sherry. I was just looking at your software and see that your tools have the potential to grow. The majority of designers like me are looking for good graphical tools you have. You can achieve these things only if you continue to improve your software. And the graphical user interface is a good starting point.

  5. Andres

    I saw this article on other website. It had identical meaning but in a completely different words.

  6. Benedict

    Hello Easy2Convert, your apps are incredible I know it. Very useful tools for every designer.

  7. Brittany

    I came to your blog and noticed you could have a lot more hits. I have found that the key to running a website is making sure the visitors you are getting are interested in your niche.

  8. Rick

    A motivating discussion is definitely worth comment. I believe that you should write more about this cmd.exe issue. To the next! All the best!

  9. Ket

    Hi. Keep up the good work and say hi to everyone down there. The command line interface looks fantastic. You’ve done well. Good luck.

  10. The Nord

    Nice information on the CMD topic, been wanting to get one of these, but didn’t knew if it really performed well.

  11. Michael K.

    This came at the right time when I was looking for how to use command-line with my converter. Thank you for sharing this.

  12. ray

    have you given any thought at all with converting your main webpage into french? i know a couple of of translaters here that will would help you do it for no cost if you want to contact me personally.

  13. max2015

    Nevertheless I like your blog. I might need to use a normal web browser just to enjoy it.

  14. Tiffany

    Beautiful. It is a truly special experience here and be part of the community experience.

  15. Titus

    You should share more useful tips like this. These type of articles are the most valuable. I know writing content is hard work, but the effort is much appreciated by the users, the info helped me to save a lot of time, thanks!

  16. toms

    Appreciating the hard work you put into your blog and detailed information you offer. It’s good to come across a blog every once in a while that isn’t the same outdated rehashed material. Excellent read! I’ve saved your site and I’m adding your RSS feeds to my Google account.

  17. Quinton

    Excellent.. Wonderful.. Please more posts like this (about command-line and software automation)!

  18. Huey G

    Hello there I am so grateful I found your blog, I really found you by mistake, while I was researching on Askjeeve for something else, Anyhow I am here now and would just like to say thanks for this CMD post, I don’t have time to read it all at the moment but I have saved it and also included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the great work.

  19. Clara Nova

    I just found your website on second page of serach engine, your post about cmd.exe is very interesting, exaclty what I was looking for.

  20. Wariner

    I just want to tell you that I’ll definitely bookmark your post. You surely have a good article about the command-line using for converting images. Thanks for revealing the info.

  21. Jim

    There are some interesting points this article. Good info about cmd invoking, thanks and we want more! Added to FeedBurner as well…

  22. Kennith K.

    Hi I am so thrilled I found your blog, I really found you by accident, while I was researching on Google for something else. Please do keep up the excellent work.

  23. Shavonne

    Fantastic post however I was wondering if you could write a little
    more on this topic? I’d be very thankful if you could
    provide some more examples how to use cmd. Cheers!

Comments are closed.