You could basically use the following method on the server side:
QImage QImage::fromData(const uchar * data, int size, const char * format = 0) [static]
Constructs a QImage from the first size bytes of the given binary data. The loader attempts to read the image using the specified format. If format is not specified (which is the default), the loader probes the file for a header to guess the file format. binary data. The loader attempts to read the image, either using the optional image format specified or by determining the image format from the data.
If format is not specified (which is the default), the loader probes the file for a header to determine the file format. If format is specified, it must be one of the values returned by QImageReader::supportedImageFormats().
If the loading of the image fails, the image returned will be a null image.
Just make sure you send the raw data through properly. Also, make sure that your image format is actually supported by Qt as follows:
QList QImageReader::supportedImageFormats() [static]
Returns the list of image formats supported by QImageReader.
By default, Qt can read the following formats:
Format MIME type Description
BMP image/bmp Windows Bitmap
GIF image/gif Graphic Interchange Format (optional)
JPG image/jpeg Joint Photographic Experts Group
PNG image/png Portable Network Graphics
PBM image/x-portable-bitmap Portable Bitmap
PGM image/x-portable-graymap Portable Graymap
PPM image/x-portable-pixmap Portable Pixmap
XBM image/x-xbitmap X11 Bitmap
XPM image/x-xpixmap X11 Pixmap
SVG image/svg+xml Scalable Vector Graphics
Reading and writing SVG files is supported through the Qt SVG module. The Qt Image Formats module provides support for additional image formats.
Note that the QApplication instance must be created before this function is called.