• 5989阅读
  • 1回复

有谁用过QImageIOHandler?想问问细节。 [复制链接]

上一主题 下一主题
离线彩阳
 

只看楼主 倒序阅读 楼主  发表于: 2012-12-01
我制作的插件已经写好了。现在就差移除调试功能了。但是我有一个问题,关于QImageIOHandler的。
Qt文档中写道:


enum QImageIOHandler::ImageOption


This 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.
ConstantValueDescription
QImageIOHandler::Size0The 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::ClipRect1The 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::ScaledSize4The 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::ScaledClipRect3The 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::Description2The 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::CompressionRatio5The 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::Gamma6The 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::Quality7The 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::Name8The 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::SubType9The 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::IncrementalReading10A 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::Endianness11The 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::Animation12Image formats that support animation return true for this value in supportsOption(); otherwise, false is returned.
QImageIOHandler::BackgroundColor13Certain 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::ImageFormat14The image's data format returned by the handler. This can be any of the formats listed in QImage::Format.
注意带底纹的那行字,我想访问的是这个属性,请问用外部调用通过什么方法才能访问这个属性呢?欢迎大家和我一块讨论。
上海Qt开发联盟,热忱地欢迎你的加入!
离线彩阳

只看该作者 1楼 发表于: 2012-12-01
网络问题,发重复了……
上海Qt开发联盟,热忱地欢迎你的加入!
快速回复
限100 字节
 
上一个 下一个