160 const quint16 tmp[6] = { htons(0),
165 socket->
write((
char*)tmp,
sizeof(tmp));
167 const quint32 encoding = htonl(-239);
168 socket->
write((
char*)(&encoding),
sizeof(encoding));
178 char *buffer =
new char[n];
179 for (
int i = 0; i < img.height(); ++i) {
181 socket->
write(buffer, n);
189 const int width = (bitmap.
width() + 7) / 8;
190 for (
int i = 0; i < bitmap.
height(); ++i)
void convertPixels(char *dst, const char *src, int count) const
bool isNull() const
Returns true if it is a null image, otherwise returns false.
bool hasAlphaChannel() const
Returns true if the image has a format that respects the alpha channel, otherwise returns false...
QVNCScreen * screen() const
The QImage class provides a hardware-independent image representation that allows direct access to th...
QImage createAlphaMask(Qt::ImageConversionFlags flags=Qt::AutoColor) const
Builds and returns a 1-bpp mask from the alpha buffer in this image.
The QTcpSocket class provides a TCP socket.
int depth() const
Returns the depth of the image.
QSize size() const
Returns the size of the image, i.
int width() const
Returns the width of the image.
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const Q_REQUIRED_RESULT
Returns a copy of the image in the given format.
QTcpSocket * clientSocket() const
QImage::Format pixelFormat() const
Returns the pixel format of the screen, or QImage::Format_Invalid if the pixel format is not a suppor...
int height() const
Returns the height of the image.
int y() const
Returns the y coordinate of this point.
int x() const
Returns the x coordinate of this point.
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
int clientBytesPerPixel() const