API reference - Class QImageIOHandler

Notation used in Ruby API documentation

Module: QtGui

Description: Binding of QImageIOHandler

Class hierarchy: QImageIOHandler

Sub-classes: ImageOption, QFlags_ImageOption, Transformation, QFlags_Transformation

Public constructors

new QImageIOHandlernewConstructor QImageIOHandler::QImageIOHandler()

Public methods

[const]QImageIOHandler ptr_const_castReturns a non-const reference to self.
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
[const]boolcanReadVirtual method bool QImageIOHandler::canRead()
[const]intcurrentImageNumberVirtual method int QImageIOHandler::currentImageNumber()
[const]QRectcurrentImageRectVirtual method QRect QImageIOHandler::currentImageRect()
[const]QIODevice ptrdeviceMethod QIODevice *QImageIOHandler::device()
voiddevice=(QIODevice ptr device)Method void QImageIOHandler::setDevice(QIODevice *device)
[const]bytesformatMethod QByteArray QImageIOHandler::format()
voidformat=(bytes format)Method void QImageIOHandler::setFormat(const QByteArray &format)
[const]voidformat=(bytes format)Method void QImageIOHandler::setFormat(const QByteArray &format)
[const]intimageCountVirtual method int QImageIOHandler::imageCount()
booljumpToImage(int imageNumber)Virtual method bool QImageIOHandler::jumpToImage(int imageNumber)
booljumpToNextImageVirtual method bool QImageIOHandler::jumpToNextImage()
[const]intloopCountVirtual method int QImageIOHandler::loopCount()
[const]bytesnameVirtual method QByteArray QImageIOHandler::name()
[const]intnextImageDelayVirtual method int QImageIOHandler::nextImageDelay()
[const]variantoption(const QImageIOHandler_ImageOption option)Virtual method QVariant QImageIOHandler::option(QImageIOHandler::ImageOption option)
boolread(QImage ptr image)Virtual method bool QImageIOHandler::read(QImage *image)
voidsetDevice(QIODevice ptr device)Method void QImageIOHandler::setDevice(QIODevice *device)
voidsetFormat(bytes format)Method void QImageIOHandler::setFormat(const QByteArray &format)
[const]voidsetFormat(bytes format)Method void QImageIOHandler::setFormat(const QByteArray &format)
voidsetOption(const QImageIOHandler_ImageOption option,
variant value)
Virtual method void QImageIOHandler::setOption(QImageIOHandler::ImageOption option, const QVariant &value)
[const]boolsupportsOption(const QImageIOHandler_ImageOption option)Virtual method bool QImageIOHandler::supportsOption(QImageIOHandler::ImageOption option)
boolwrite(const QImage image)Virtual method bool QImageIOHandler::write(const QImage &image)

Public static methods and constants

[static,const]QImageIOHandler_ImageOptionAnimationEnum constant QImageIOHandler::Animation
[static,const]QImageIOHandler_ImageOptionBackgroundColorEnum constant QImageIOHandler::BackgroundColor
[static,const]QImageIOHandler_ImageOptionClipRectEnum constant QImageIOHandler::ClipRect
[static,const]QImageIOHandler_ImageOptionCompressionRatioEnum constant QImageIOHandler::CompressionRatio
[static,const]QImageIOHandler_ImageOptionDescriptionEnum constant QImageIOHandler::Description
[static,const]QImageIOHandler_ImageOptionEndiannessEnum constant QImageIOHandler::Endianness
[static,const]QImageIOHandler_ImageOptionGammaEnum constant QImageIOHandler::Gamma
[static,const]QImageIOHandler_ImageOptionImageFormatEnum constant QImageIOHandler::ImageFormat
[static,const]QImageIOHandler_ImageOptionImageTransformationEnum constant QImageIOHandler::ImageTransformation
[static,const]QImageIOHandler_ImageOptionIncrementalReadingEnum constant QImageIOHandler::IncrementalReading
[static,const]QImageIOHandler_ImageOptionNameEnum constant QImageIOHandler::Name
[static,const]QImageIOHandler_ImageOptionOptimizedWriteEnum constant QImageIOHandler::OptimizedWrite
[static,const]QImageIOHandler_ImageOptionProgressiveScanWriteEnum constant QImageIOHandler::ProgressiveScanWrite
[static,const]QImageIOHandler_ImageOptionQualityEnum constant QImageIOHandler::Quality
[static,const]QImageIOHandler_ImageOptionScaledClipRectEnum constant QImageIOHandler::ScaledClipRect
[static,const]QImageIOHandler_ImageOptionScaledSizeEnum constant QImageIOHandler::ScaledSize
[static,const]QImageIOHandler_ImageOptionSizeEnum constant QImageIOHandler::Size
[static,const]QImageIOHandler_ImageOptionSubTypeEnum constant QImageIOHandler::SubType
[static,const]QImageIOHandler_ImageOptionSupportedSubTypesEnum constant QImageIOHandler::SupportedSubTypes
[static,const]QImageIOHandler_TransformationTransformationFlipEnum constant QImageIOHandler::TransformationFlip
[static,const]QImageIOHandler_TransformationTransformationFlipAndRotate90Enum constant QImageIOHandler::TransformationFlipAndRotate90
[static,const]QImageIOHandler_TransformationTransformationMirrorEnum constant QImageIOHandler::TransformationMirror
[static,const]QImageIOHandler_TransformationTransformationMirrorAndRotate90Enum constant QImageIOHandler::TransformationMirrorAndRotate90
[static,const]QImageIOHandler_TransformationTransformationNoneEnum constant QImageIOHandler::TransformationNone
[static,const]QImageIOHandler_TransformationTransformationRotate180Enum constant QImageIOHandler::TransformationRotate180
[static,const]QImageIOHandler_TransformationTransformationRotate270Enum constant QImageIOHandler::TransformationRotate270
[static,const]QImageIOHandler_TransformationTransformationRotate90Enum constant QImageIOHandler::TransformationRotate90
[static,const]QImageIOHandler_ImageOptionTransformedByDefaultEnum constant QImageIOHandler::TransformedByDefault

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

Animation

Signature: [static,const] QImageIOHandler_ImageOption Animation

Description: Enum constant QImageIOHandler::Animation

Python specific notes:
The object exposes a readable attribute 'Animation'. This is the getter.

BackgroundColor

Signature: [static,const] QImageIOHandler_ImageOption BackgroundColor

Description: Enum constant QImageIOHandler::BackgroundColor

Python specific notes:
The object exposes a readable attribute 'BackgroundColor'. This is the getter.

ClipRect

Signature: [static,const] QImageIOHandler_ImageOption ClipRect

Description: Enum constant QImageIOHandler::ClipRect

Python specific notes:
The object exposes a readable attribute 'ClipRect'. This is the getter.

CompressionRatio

Signature: [static,const] QImageIOHandler_ImageOption CompressionRatio

Description: Enum constant QImageIOHandler::CompressionRatio

Python specific notes:
The object exposes a readable attribute 'CompressionRatio'. This is the getter.

Description

Signature: [static,const] QImageIOHandler_ImageOption Description

Description: Enum constant QImageIOHandler::Description

Python specific notes:
The object exposes a readable attribute 'Description'. This is the getter.

Endianness

Signature: [static,const] QImageIOHandler_ImageOption Endianness

Description: Enum constant QImageIOHandler::Endianness

Python specific notes:
The object exposes a readable attribute 'Endianness'. This is the getter.

Gamma

Signature: [static,const] QImageIOHandler_ImageOption Gamma

Description: Enum constant QImageIOHandler::Gamma

Python specific notes:
The object exposes a readable attribute 'Gamma'. This is the getter.

ImageFormat

Signature: [static,const] QImageIOHandler_ImageOption ImageFormat

Description: Enum constant QImageIOHandler::ImageFormat

Python specific notes:
The object exposes a readable attribute 'ImageFormat'. This is the getter.

ImageTransformation

Signature: [static,const] QImageIOHandler_ImageOption ImageTransformation

Description: Enum constant QImageIOHandler::ImageTransformation

Python specific notes:
The object exposes a readable attribute 'ImageTransformation'. This is the getter.

IncrementalReading

Signature: [static,const] QImageIOHandler_ImageOption IncrementalReading

Description: Enum constant QImageIOHandler::IncrementalReading

Python specific notes:
The object exposes a readable attribute 'IncrementalReading'. This is the getter.

Name

Signature: [static,const] QImageIOHandler_ImageOption Name

Description: Enum constant QImageIOHandler::Name

Python specific notes:
The object exposes a readable attribute 'Name'. This is the getter.

OptimizedWrite

Signature: [static,const] QImageIOHandler_ImageOption OptimizedWrite

Description: Enum constant QImageIOHandler::OptimizedWrite

Python specific notes:
The object exposes a readable attribute 'OptimizedWrite'. This is the getter.

ProgressiveScanWrite

Signature: [static,const] QImageIOHandler_ImageOption ProgressiveScanWrite

Description: Enum constant QImageIOHandler::ProgressiveScanWrite

Python specific notes:
The object exposes a readable attribute 'ProgressiveScanWrite'. This is the getter.

Quality

Signature: [static,const] QImageIOHandler_ImageOption Quality

Description: Enum constant QImageIOHandler::Quality

Python specific notes:
The object exposes a readable attribute 'Quality'. This is the getter.

ScaledClipRect

Signature: [static,const] QImageIOHandler_ImageOption ScaledClipRect

Description: Enum constant QImageIOHandler::ScaledClipRect

Python specific notes:
The object exposes a readable attribute 'ScaledClipRect'. This is the getter.

ScaledSize

Signature: [static,const] QImageIOHandler_ImageOption ScaledSize

Description: Enum constant QImageIOHandler::ScaledSize

Python specific notes:
The object exposes a readable attribute 'ScaledSize'. This is the getter.

Size

Signature: [static,const] QImageIOHandler_ImageOption Size

Description: Enum constant QImageIOHandler::Size

Python specific notes:
The object exposes a readable attribute 'Size'. This is the getter.

SubType

Signature: [static,const] QImageIOHandler_ImageOption SubType

Description: Enum constant QImageIOHandler::SubType

Python specific notes:
The object exposes a readable attribute 'SubType'. This is the getter.

SupportedSubTypes

Signature: [static,const] QImageIOHandler_ImageOption SupportedSubTypes

Description: Enum constant QImageIOHandler::SupportedSubTypes

Python specific notes:
The object exposes a readable attribute 'SupportedSubTypes'. This is the getter.

TransformationFlip

Signature: [static,const] QImageIOHandler_Transformation TransformationFlip

Description: Enum constant QImageIOHandler::TransformationFlip

Python specific notes:
The object exposes a readable attribute 'TransformationFlip'. This is the getter.

TransformationFlipAndRotate90

Signature: [static,const] QImageIOHandler_Transformation TransformationFlipAndRotate90

Description: Enum constant QImageIOHandler::TransformationFlipAndRotate90

Python specific notes:
The object exposes a readable attribute 'TransformationFlipAndRotate90'. This is the getter.

TransformationMirror

Signature: [static,const] QImageIOHandler_Transformation TransformationMirror

Description: Enum constant QImageIOHandler::TransformationMirror

Python specific notes:
The object exposes a readable attribute 'TransformationMirror'. This is the getter.

TransformationMirrorAndRotate90

Signature: [static,const] QImageIOHandler_Transformation TransformationMirrorAndRotate90

Description: Enum constant QImageIOHandler::TransformationMirrorAndRotate90

Python specific notes:
The object exposes a readable attribute 'TransformationMirrorAndRotate90'. This is the getter.

TransformationNone

Signature: [static,const] QImageIOHandler_Transformation TransformationNone

Description: Enum constant QImageIOHandler::TransformationNone

Python specific notes:
The object exposes a readable attribute 'TransformationNone'. This is the getter.

TransformationRotate180

Signature: [static,const] QImageIOHandler_Transformation TransformationRotate180

Description: Enum constant QImageIOHandler::TransformationRotate180

Python specific notes:
The object exposes a readable attribute 'TransformationRotate180'. This is the getter.

TransformationRotate270

Signature: [static,const] QImageIOHandler_Transformation TransformationRotate270

Description: Enum constant QImageIOHandler::TransformationRotate270

Python specific notes:
The object exposes a readable attribute 'TransformationRotate270'. This is the getter.

TransformationRotate90

Signature: [static,const] QImageIOHandler_Transformation TransformationRotate90

Description: Enum constant QImageIOHandler::TransformationRotate90

Python specific notes:
The object exposes a readable attribute 'TransformationRotate90'. This is the getter.

TransformedByDefault

Signature: [static,const] QImageIOHandler_ImageOption TransformedByDefault

Description: Enum constant QImageIOHandler::TransformedByDefault

Python specific notes:
The object exposes a readable attribute 'TransformedByDefault'. This is the getter.

_const_cast

Signature: [const] QImageIOHandler ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_create

Signature: void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

_destroy

Signature: void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

_destroyed?

Signature: [const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

_is_const_object?

Signature: [const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

canRead

Signature: [const] bool canRead

Description: Virtual method bool QImageIOHandler::canRead()

This method can be reimplemented in a derived class.

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

currentImageNumber

Signature: [const] int currentImageNumber

Description: Virtual method int QImageIOHandler::currentImageNumber()

This method can be reimplemented in a derived class.

currentImageRect

Signature: [const] QRect currentImageRect

Description: Virtual method QRect QImageIOHandler::currentImageRect()

This method can be reimplemented in a derived class.

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

destroyed?

Signature: [const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

device

Signature: [const] QIODevice ptr device

Description: Method QIODevice *QImageIOHandler::device()

Python specific notes:
The object exposes a readable attribute 'device'. This is the getter.

device=

Signature: void device= (QIODevice ptr device)

Description: Method void QImageIOHandler::setDevice(QIODevice *device)

Python specific notes:
The object exposes a writable attribute 'device'. This is the setter.

format

Signature: [const] bytes format

Description: Method QByteArray QImageIOHandler::format()

Python specific notes:
The object exposes a readable attribute 'format'. This is the getter.

format=

(1) Signature: void format= (bytes format)

Description: Method void QImageIOHandler::setFormat(const QByteArray &format)

Python specific notes:
The object exposes a writable attribute 'format'. This is the setter.

(2) Signature: [const] void format= (bytes format)

Description: Method void QImageIOHandler::setFormat(const QByteArray &format)

Python specific notes:
The object exposes a writable attribute 'format'. This is the setter.

imageCount

Signature: [const] int imageCount

Description: Virtual method int QImageIOHandler::imageCount()

This method can be reimplemented in a derived class.

is_const_object?

Signature: [const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

jumpToImage

Signature: bool jumpToImage (int imageNumber)

Description: Virtual method bool QImageIOHandler::jumpToImage(int imageNumber)

This method can be reimplemented in a derived class.

jumpToNextImage

Signature: bool jumpToNextImage

Description: Virtual method bool QImageIOHandler::jumpToNextImage()

This method can be reimplemented in a derived class.

loopCount

Signature: [const] int loopCount

Description: Virtual method int QImageIOHandler::loopCount()

This method can be reimplemented in a derived class.

name

Signature: [const] bytes name

Description: Virtual method QByteArray QImageIOHandler::name()

This method can be reimplemented in a derived class.

new

Signature: [static] new QImageIOHandler new

Description: Constructor QImageIOHandler::QImageIOHandler()

This method creates an object of class QImageIOHandler.

Python specific notes:
This method is the default initializer of the object.

nextImageDelay

Signature: [const] int nextImageDelay

Description: Virtual method int QImageIOHandler::nextImageDelay()

This method can be reimplemented in a derived class.

option

Signature: [const] variant option (const QImageIOHandler_ImageOption option)

Description: Virtual method QVariant QImageIOHandler::option(QImageIOHandler::ImageOption option)

This method can be reimplemented in a derived class.

read

Signature: bool read (QImage ptr image)

Description: Virtual method bool QImageIOHandler::read(QImage *image)

This method can be reimplemented in a derived class.

setDevice

Signature: void setDevice (QIODevice ptr device)

Description: Method void QImageIOHandler::setDevice(QIODevice *device)

Python specific notes:
The object exposes a writable attribute 'device'. This is the setter.

setFormat

(1) Signature: void setFormat (bytes format)

Description: Method void QImageIOHandler::setFormat(const QByteArray &format)

Python specific notes:
The object exposes a writable attribute 'format'. This is the setter.

(2) Signature: [const] void setFormat (bytes format)

Description: Method void QImageIOHandler::setFormat(const QByteArray &format)

Python specific notes:
The object exposes a writable attribute 'format'. This is the setter.

setOption

Signature: void setOption (const QImageIOHandler_ImageOption option, variant value)

Description: Virtual method void QImageIOHandler::setOption(QImageIOHandler::ImageOption option, const QVariant &value)

This method can be reimplemented in a derived class.

supportsOption

Signature: [const] bool supportsOption (const QImageIOHandler_ImageOption option)

Description: Virtual method bool QImageIOHandler::supportsOption(QImageIOHandler::ImageOption option)

This method can be reimplemented in a derived class.

write

Signature: bool write (const QImage image)

Description: Virtual method bool QImageIOHandler::write(const QImage &image)

This method can be reimplemented in a derived class.