QImageEncoderSettings 类

The QImageEncoderSettings 类提供一组图像编码器设置。 更多...

头: #include <QImageEncoderSettings>
qmake: QT += multimedia

公共函数

QImageEncoderSettings ()
QImageEncoderSettings (const QImageEncoderSettings & other )
~QImageEncoderSettings ()
QString codec () const
QVariant encodingOption (const QString & option ) const
QVariantMap encodingOptions () const
bool isNull () const
QMultimedia::EncodingQuality quality () const
QSize resolution () const
void setCodec (const QString & codec )
void setEncodingOption (const QString & option , const QVariant & value )
void setEncodingOptions (const QVariantMap & options )
void setQuality (QMultimedia::EncodingQuality quality )
void setResolution (const QSize & resolution )
void setResolution (int width , int height )
bool operator!= (const QImageEncoderSettings & other ) const
QImageEncoderSettings & operator= (const QImageEncoderSettings & other )
bool operator== (const QImageEncoderSettings & other ) const

详细描述

The QImageEncoderSettings 类提供一组图像编码器设置。

A image encoder settings object is used to specify the image encoder settings used by QCameraImageCapture . Image encoder settings are selected by constructing a QImageEncoderSettings object, setting the desired properties and then passing it to a QCameraImageCapture instance using the QCameraImageCapture::setImageSettings() function.

QImageEncoderSettings imageSettings;
imageSettings.setCodec("image/jpeg");
imageSettings.setResolution(1600, 1200);
imageCapture->setEncodingSettings(imageSettings);
					

另请参阅 QImageEncoderControl .

成员函数文档编制

QImageEncoderSettings:: QImageEncoderSettings ()

构造 null 图像编码器设置对象。

QImageEncoderSettings:: QImageEncoderSettings (const QImageEncoderSettings & other )

构造副本为图像编码器设置对象 other .

QImageEncoderSettings:: ~QImageEncoderSettings ()

销毁图像编码器设置对象。

QString QImageEncoderSettings:: codec () const

返回图像编解码器。

另请参阅 setCodec ().

QVariant QImageEncoderSettings:: encodingOption (const QString & option ) const

返回值为编码 option .

另请参阅 setEncodingOption () 和 encodingOptions ().

QVariantMap QImageEncoderSettings:: encodingOptions () const

返回所有编码选项按 QVariantMap .

另请参阅 encodingOption () 和 setEncodingOptions ().

bool QImageEncoderSettings:: isNull () const

Identifies if a image encoder settings object is uninitalized.

Returns true if the settings are null, and false if they are not.

QMultimedia::EncodingQuality QImageEncoderSettings:: quality () const

返回图像编码品质。

另请参阅 setQuality ().

QSize QImageEncoderSettings:: resolution () const

返回编码图像的分辨率。

另请参阅 setResolution ().

void QImageEncoderSettings:: setCodec (const QString & codec )

设置图像 codec .

另请参阅 codec ().

void QImageEncoderSettings:: setEncodingOption (const QString & option , const QVariant & value )

设置编码 option value .

The supported set and meaning of encoding options are system and selected codec specific.

另请参阅 encodingOption () 和 setEncodingOptions ().

void QImageEncoderSettings:: setEncodingOptions (const QVariantMap & options )

Replace all the encoding options with options .

The supported set and meaning of encoding options are system and selected codec specific.

另请参阅 encodingOptions (), encodingOption (),和 setEncodingOption ().

void QImageEncoderSettings:: setQuality ( QMultimedia::EncodingQuality quality )

设置图像编码 quality .

另请参阅 quality ().

void QImageEncoderSettings:: setResolution (const QSize & resolution )

设置 resolution 为编码图像。

QSize indicates the encoder should make an optimal choice based on what is available from the image source and the limitations of the codec.

另请参阅 resolution ().

void QImageEncoderSettings:: setResolution ( int width , int height )

设置 width and height of the resolution of the encoded image.

这是重载函数。

bool QImageEncoderSettings:: operator!= (const QImageEncoderSettings & other ) const

Determines if other is of equal value to a image encoder settings object.

Returns true if the settings objects are not of equal value, and false if they are of equal value.

QImageEncoderSettings &QImageEncoderSettings:: operator= (const QImageEncoderSettings & other )

Assigns the value of other to a image encoder settings object.

bool QImageEncoderSettings:: operator== (const QImageEncoderSettings & other ) const

Determines if other is of equal value to a image encoder settings object.

Returns true if the settings objects are of equal value, and false if they are not of equal value.