C++ (Qt)...m_socket->write(imageToByteArray());...
C++ (Qt)...QPixmap pixmap(100, 100);QPainter painter(&pixmap);painter.drawRect(10, 10, 90, 90);...