Hexadecimal notation is just a way to write a bytes value in source code.

You need to identify the your source data format and your destination data format.

Depending on the latter you might be able to use the data loaded into a QImage directly via QImage::bits() or via saving with the destination format into QBuffer.

Cheers,
_