I want to send OpenCV single channel images (CV_8UC1) and multichannel images (CV_8UC3) to a ftp server using QNetworkAccessManager object in Qt 5.2.
I tried put method of QNetworkAccessManager which sends data in one of the following formats:
QNetworkReply *put(const QNetworkRequest &request, QIODevice *data);
QNetworkReply *put(const QNetworkRequest &request, const QByteArray &data);
QNetworkReply *put(const QNetworkRequest &request, QHttpMultiPart *multiPart);
and it works fine for text files or images which I read from hard disk. but I don't know how to send opencv grayscale and color images which I have them on my RAM using this method ?
I think I have to change my format to Qbytearray and then send it, but by searching The Internet I didn't find anything useful. I only found this which is not suitable for my application and it's somehow waste some time to produce that image and also I need to change my cv::mat to IplImage ....
Thanks