In this section, we will learn how to build a simple image converter that converts an image from one format to another. Qt supports reading and writing different types of image formats, and this support comes in the form of external DLL files due to licensing issues. However, you don't have to worry about that because as long as you include those DLL files in your project, it will work seamlessly across different formats. There are certain formats that only support reading and not writing, and some that support both. You can check out the full details at http://doc.qt.io/qt-5/qtimageformats-index.html.
Qt's built-in image libraries make image conversion really simple:
First of all, open up Qt Creator and create a new Qt Widgets Application project.
mainwindow.uiand add a line edit and push button to the canvas for selecting image files, a combo box for selecting the desired file format, and another push button for starting the conversion process: