QPixmap has a range of formats it knows about. The ones it knows about work directly. You can construct a QImage from raw data in a number of formats, and you can convert a QImage to a QPixmap.

Use ImageMagick to convert the foreign formats to ones that Qt can handle.