我制作的
插件已经写好了。现在就差移除调试功能了。但是我有一个
问题,关于
QImageIOHandler的。
Qt文档中写道:
enum QImageIOHandler::ImageOptionThis enum describes the different options supported by
QImageIOHandler. Some options are used to query an image for properties, and others are used to toggle the way in which an image should be written.
Constant | Value | Description |
QImageIOHandler::Size | 0 | The original size of an image. A handler that supports this option is expected to read the size of the image from the image metadata, and return this size from option() as aQSize. |
QImageIOHandler::ClipRect | 1 | The clip rect, or ROI (Region Of Interest). A handler that supports this option is expected to only read the provided QRect area from the original image in read(), before any other transformation is applied. |
QImageIOHandler::ScaledSize | 4 | The scaled size of the image. A handler that supports this option is expected to scale the image to the provided size (a QSize), after applying any clip rect transformation (ClipRect). If the handler does not support this option, QImageReader will perform the scaling after the image has been read. |
QImageIOHandler::ScaledClipRect | 3 | The scaled clip rect (or ROI, Region Of Interest) of the image. A handler that supports this option is expected to apply the provided clip rect (a QRect), after applying any scaling (ScaleSize) or regular clipping (ClipRect). If the handler does not support this option, QImageReader will apply the scaled clip rect after the image has been read. |
QImageIOHandler::Description | 2 | The image description. Some image formats, such as GIF and PNG, allow embedding of text or comments into the image data (e.g., for storing copyright information). It's common that the text is stored in key-value pairs, but some formats store all text in one continuous block. QImageIOHandler returns the text as one QString, where keys and values are separated by a ':', and keys-value pairs are separated by two newlines (\n\n). For example, "Title: Sunset\n\nAuthor: Jim Smith\nSarah Jones\n\n". Formats that store text in a single block can use "Description" as the key. |
QImageIOHandler::CompressionRatio | 5 | The compression ratio of the image data. A handler that supports this option is expected to set its compression rate depending on the value of this option (an int) when writing. |
QImageIOHandler::Gamma | 6 | The gamma level of the image. A handler that supports this option is expected to set the image gamma level depending on the value of this option (a float) when writing. |
QImageIOHandler::Quality | 7 | The quality level of the image. A handler that supports this option is expected to set the image quality level depending on the value of this option (an int) when writing. |
QImageIOHandler::Name | 8 | The name of the image. A handler that supports this option is expected to read the name from the image metadata and return this as a QString, or when writing an image it is expected to store the name in the image metadata. |
QImageIOHandler::SubType | 9 | The subtype of the image. A handler that supports this option can use the subtype value to help when reading and writing images. For example, a PPM handler may have a subtype value of "ppm" or "ppmraw". |
QImageIOHandler::IncrementalReading | 10 | A handler that supports this option is expected to read the image in several passes, as if it was an animation. QImageReader will treat the image as an animation. |
QImageIOHandler::Endianness | 11 | The endianness of the image. Certain image formats can be stored as BigEndian or LittleEndian. A handler that supports Endianness uses the value of this option to determine how the image should be stored. |
QImageIOHandler::Animation | 12 | Image formats that support animation return true for this value in supportsOption(); otherwise, false is returned. |
QImageIOHandler::BackgroundColor | 13 | Certain image formats allow the background color to be specified. A handler that supports BackgroundColor initializes the background color to this option (a QColor) when reading an image. |
QImageIOHandler::ImageFormat | 14 | The image's data format returned by the handler. This can be any of the formats listed in QImage::Format. |
注意带底纹的那行字,我想访问的是这个属性,请问用外部调用通过什么方法才能访问这个属性呢?欢迎大家和我一块讨论。