Qt 4.8
Classes | Functions
qimage.h File Reference
#include <QtGui/qtransform.h>
#include <QtGui/qpaintdevice.h>
#include <QtGui/qrgb.h>
#include <QtCore/qbytearray.h>
#include <QtCore/qrect.h>
#include <QtCore/qstring.h>

Go to the source code of this file.

Classes

class  QImage
 The QImage class provides a hardware-independent image representation that allows direct access to the pixel data, and can be used as a paint device. More...
 
class  QImageTextKeyLang
 
class  QList< T >
 The QList class is a template class that provides lists. More...
 
class  QVector< T >
 The QVector class is a template class that provides a dynamic array. More...
 

Functions

Q_GUI_EXPORT QDataStreamoperator<< (QDataStream &, const QImage &)
 
Q_GUI_EXPORT QDataStreamoperator>> (QDataStream &, QImage &)
 
 Q_DECLARE_TYPEINFO (QImage, Q_MOVABLE_TYPE)
 

Function Documentation

◆ operator<<()

Q_GUI_EXPORT QDataStream& operator<< ( QDataStream ,
const QImage  
)
related

Definition at line 5406 of file qimage.cpp.

Referenced by QImage::setPixel().

5407 {
5408  if (s.version() >= 5) {
5409  if (image.isNull()) {
5410  s << (qint32) 0; // null image marker
5411  return s;
5412  } else {
5413  s << (qint32) 1;
5414  // continue ...
5415  }
5416  }
5417  QImageWriter writer(s.device(), s.version() == 1 ? "bmp" : "png");
5418  writer.write(image);
5419  return s;
5420 }
int qint32
Definition: qglobal.h:937
The QImageWriter class provides a format independent interface for writing images to files or other d...
Definition: qimagewriter.h:59
bool write(const QImage &image)
Writes the image image to the assigned device or file name.

◆ operator>>()

Q_GUI_EXPORT QDataStream& operator>> ( QDataStream ,
QImage  
)
related

Definition at line 5435 of file qimage.cpp.

Referenced by QImage::setPixel().

5436 {
5437  if (s.version() >= 5) {
5438  qint32 nullMarker;
5439  s >> nullMarker;
5440  if (!nullMarker) {
5441  image = QImage(); // null image
5442  return s;
5443  }
5444  }
5445  image = QImageReader(s.device(), 0).read();
5446  return s;
5447 }
int qint32
Definition: qglobal.h:937
The QImage class provides a hardware-independent image representation that allows direct access to th...
Definition: qimage.h:87
The QImageReader class provides a format independent interface for reading images from files or other...
Definition: qimagereader.h:62

◆ Q_DECLARE_TYPEINFO()

Q_DECLARE_TYPEINFO ( QImage  ,
Q_MOVABLE_TYPE   
)

Referenced by QImage::data_ptr().