title: how to send opencv gray scale and color images to a ftp server in Qt?
body: <p>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.</p>
  
  <p>I tried put method of QNetworkAccessManager which sends data in one of the following formats:</p>
  
  <pre><code>QNetworkReply *put(const QNetworkRequest &amp;request, QIODevice *data);
  QNetworkReply *put(const QNetworkRequest &amp;request, const QByteArray &amp;data);
  QNetworkReply *put(const QNetworkRequest &amp;request, QHttpMultiPart *multiPart);
  </code></pre>
  
  <p>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 ?</p>
  
  <p>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 <a href="http://umanga.wordpress.com/2010/04/19/how-to-covert-qt-qimage-into-opencv-iplimage-and-wise-versa/" rel="nofollow">this</a> 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 ....</p>
  
  <p>Thanks</p>