⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qimage.3qt

📁 linux下GUI编程工具qt的在线连接帮助手册
💻 3QT
📖 第 1 页 / 共 3 页
字号:
'\" t.TH QImage 3qt "11 October 2001" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQImage \- Hardware-independent pixmap representation with direct access to the pixel data.PP\fC#include <qimage.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "enum \fBEndian\fR { IgnoreEndian, BigEndian, LittleEndian }".br.ti -1c.BI "\fBQImage\fR ()".br.ti -1c.BI "\fBQImage\fR ( int w, int h, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian )".br.ti -1c.BI "\fBQImage\fR ( const QSize & size, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian )".br.ti -1c.BI "\fBQImage\fR ( const QString & fileName, const char * format = 0 )".br.ti -1c.BI "\fBQImage\fR ( const char * const xpm[] )".br.ti -1c.BI "\fBQImage\fR ( const QByteArray & array )".br.ti -1c.BI "\fBQImage\fR ( uchar * yourdata, int w, int h, int depth, QRgb * colortable, int numColors, Endian bitOrder )".br.ti -1c.BI "\fBQImage\fR ( const QImage & image )".br.ti -1c.BI "\fB~QImage\fR ()".br.ti -1c.BI "QImage & \fBoperator=\fR ( const QImage & image )".br.ti -1c.BI "QImage & \fBoperator=\fR ( const QPixmap & pixmap )".br.ti -1c.BI "bool \fBoperator==\fR ( const QImage & i ) const".br.ti -1c.BI "bool \fBoperator!=\fR ( const QImage & i ) const".br.ti -1c.BI "void \fBdetach\fR ()".br.ti -1c.BI "QImage \fBcopy\fR () const".br.ti -1c.BI "QImage \fBcopy\fR ( int x, int y, int w, int h, int conversion_flags = 0 ) const".br.ti -1c.BI "QImage \fBcopy\fR ( const QRect & r ) const".br.ti -1c.BI "bool \fBisNull\fR () const".br.ti -1c.BI "int \fBwidth\fR () const".br.ti -1c.BI "int \fBheight\fR () const".br.ti -1c.BI "QSize \fBsize\fR () const".br.ti -1c.BI "QRect \fBrect\fR () const".br.ti -1c.BI "int \fBdepth\fR () const".br.ti -1c.BI "int \fBnumColors\fR () const".br.ti -1c.BI "Endian \fBbitOrder\fR () const".br.ti -1c.BI "QRgb \fBcolor\fR ( int i ) const".br.ti -1c.BI "void \fBsetColor\fR ( int i, QRgb c )".br.ti -1c.BI "void \fBsetNumColors\fR ( int numColors )".br.ti -1c.BI "bool \fBhasAlphaBuffer\fR () const".br.ti -1c.BI "void \fBsetAlphaBuffer\fR ( bool enable )".br.ti -1c.BI "bool \fBallGray\fR () const".br.ti -1c.BI "bool \fBisGrayscale\fR () const".br.ti -1c.BI "uchar * \fBbits\fR () const".br.ti -1c.BI "uchar * \fBscanLine\fR ( int i ) const".br.ti -1c.BI "uchar ** \fBjumpTable\fR () const".br.ti -1c.BI "QRgb * \fBcolorTable\fR () const".br.ti -1c.BI "int \fBnumBytes\fR () const".br.ti -1c.BI "int \fBbytesPerLine\fR () const".br.ti -1c.BI "bool \fBcreate\fR ( int width, int height, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian )".br.ti -1c.BI "bool \fBcreate\fR ( const QSize &, int depth, int numColors = 0, Endian bitOrder = IgnoreEndian )".br.ti -1c.BI "void \fBreset\fR ()".br.ti -1c.BI "void \fBfill\fR ( uint pixel )".br.ti -1c.BI "void \fBinvertPixels\fR ( bool invertAlpha = TRUE )".br.ti -1c.BI "QImage \fBconvertDepth\fR ( int depth ) const".br.ti -1c.BI "QImage \fBconvertDepthWithPalette\fR ( int d, QRgb * palette, int palette_count, int conversion_flags = 0 ) const".br.ti -1c.BI "QImage \fBconvertDepth\fR ( int depth, int conversion_flags ) const".br.ti -1c.BI "QImage \fBconvertBitOrder\fR ( Endian bitOrder ) const".br.ti -1c.BI "enum \fBScaleMode\fR { ScaleFree, ScaleMin, ScaleMax }".br.ti -1c.BI "QImage \fBsmoothScale\fR ( int w, int h, ScaleMode mode = ScaleFree ) const".br.ti -1c.BI "QImage \fBsmoothScale\fR ( const QSize & s, ScaleMode mode = ScaleFree ) const".br.ti -1c.BI "QImage \fBscale\fR ( int w, int h, ScaleMode mode = ScaleFree ) const".br.ti -1c.BI "QImage \fBscale\fR ( const QSize & s, ScaleMode mode = ScaleFree ) const".br.ti -1c.BI "QImage \fBscaleWidth\fR ( int w ) const".br.ti -1c.BI "QImage \fBscaleHeight\fR ( int h ) const".br.ti -1c.BI "QImage \fBxForm\fR ( const QWMatrix & matrix ) const".br.ti -1c.BI "QImage \fBcreateAlphaMask\fR ( int conversion_flags = 0 ) const".br.ti -1c.BI "QImage \fBcreateHeuristicMask\fR ( bool clipTight = TRUE ) const".br.ti -1c.BI "QImage \fBmirror\fR () const".br.ti -1c.BI "QImage \fBmirror\fR ( bool horizontal, bool vertical ) const".br.ti -1c.BI "QImage \fBswapRGB\fR () const".br.ti -1c.BI "bool \fBload\fR ( const QString & fileName, const char * format = 0 )".br.ti -1c.BI "bool \fBloadFromData\fR ( const uchar * buf, uint len, const char * format = 0 )".br.ti -1c.BI "bool \fBloadFromData\fR ( QByteArray buf, const char * format = 0 )".br.ti -1c.BI "bool \fBsave\fR ( const QString & fileName, const char * format, int quality = -1 ) const".br.ti -1c.BI "bool \fBvalid\fR ( int x, int y ) const".br.ti -1c.BI "int \fBpixelIndex\fR ( int x, int y ) const".br.ti -1c.BI "QRgb \fBpixel\fR ( int x, int y ) const".br.ti -1c.BI "void \fBsetPixel\fR ( int x, int y, uint index_or_rgb )".br.ti -1c.BI "int \fBdotsPerMeterX\fR () const".br.ti -1c.BI "int \fBdotsPerMeterY\fR () const".br.ti -1c.BI "void \fBsetDotsPerMeterX\fR ( int x )".br.ti -1c.BI "void \fBsetDotsPerMeterY\fR ( int y )".br.ti -1c.BI "QPoint \fBoffset\fR () const".br.ti -1c.BI "void \fBsetOffset\fR ( const QPoint & p )".br.ti -1c.BI "QValueList<QImageTextKeyLang> \fBtextList\fR () const".br.ti -1c.BI "QStringList \fBtextLanguages\fR () const".br.ti -1c.BI "QStringList \fBtextKeys\fR () const".br.ti -1c.BI "QString \fBtext\fR ( const char * key, const char * lang = 0 ) const".br.ti -1c.BI "QString \fBtext\fR ( const QImageTextKeyLang & kl ) const".br.ti -1c.BI "void \fBsetText\fR ( const char * key, const char * lang, const QString & s )".br.in -1c.SS "Static Public Members".in +1c.ti -1c.BI "Endian \fBsystemBitOrder\fR ()".br.ti -1c.BI "Endian \fBsystemByteOrder\fR ()".br.ti -1c.BI "const char * \fBimageFormat\fR ( const QString & fileName )".br.ti -1c.BI "QStrList \fBinputFormats\fR ()".br.ti -1c.BI "QStrList \fBoutputFormats\fR ()".br.ti -1c.BI "QStringList \fBinputFormatList\fR ()".br.ti -1c.BI "QStringList \fBoutputFormatList\fR ()".br.in -1c.SH RELATED FUNCTION DOCUMENTATION.in +1c.ti -1c.BI "QDataStream & \fBoperator<<\fR ( QDataStream & s, const QImage & image )".br.ti -1c.BI "QDataStream & \fBoperator>>\fR ( QDataStream & s, QImage & image )".br.in -1c.SH DESCRIPTIONThe QImage class provides a hardware-independent pixmap representation with direct access to the pixel data..PPIt is one of the two classes Qt provides for dealing with images, the other being QPixmap. QImage is designed and optimized for I/O and for direct pixel access/manipulation. QPixmap is designed and optimized for drawing. There are (slow) functions to convert between QImage and QPixmap: QPixmap::convertToImage() and QPixmap::convertFromImage()..PPAn image has the parameters width, height and depth (bits per pixel, bpp), a color table and the actual pixels. QImage supports 1-bpp, 8-bpp and 32-bpp image data. 1-bpp and 8-bpp images use a color lookup table; the pixel value is a color table index..PP32-bpp images encode an RGB value in 24 bits and ignore the color table. The most significant byte is used for the alpha buffer..PPAn entry in the color table is an RGB triplet encoded as \fCuint\fR. Use the qRed, qGreen and qBlue functions (qcolor.h) to access the components, and qRgb to make an RGB triplet (see the QColor class documentation)..PP1-bpp (monochrome) images have a color table with maximum two colors. There are two different formats: big endian (MSB first) or little endian (LSB first) bit order. To access a single bit you will have to do some bit shifts:.PP.nf.br    QImage image;.br    // sets bit at (x,y) to 1.br    if ( image.bitOrder() == QImage::LittleEndian ).br        *(image.scanLine(y) + (x >> 3)) |= 1 << (x & 7);.br

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -