[][src]Struct qt_gui::q_image_io_handler::ImageOption

#[repr(transparent)]
pub struct 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.

C++ enum: QImageIOHandler::ImageOption.

C++ documentation:

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.

Methods

impl ImageOption[src]

pub fn to_int(&self) -> c_int[src]

impl ImageOption[src]

pub const Size: ImageOption[src]

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 a QSize. (C++ enum variant: Size = 0)

pub const ClipRect: ImageOption[src]

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. (C++ enum variant: ClipRect = 1)

pub const Description: ImageOption[src]

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. (C++ enum variant: Description = 2)

pub const ScaledClipRect: ImageOption[src]

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. (C++ enum variant: ScaledClipRect = 3)

pub const ScaledSize: ImageOption[src]

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. (C++ enum variant: ScaledSize = 4)

pub const CompressionRatio: ImageOption[src]

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. (C++ enum variant: CompressionRatio = 5)

pub const Gamma: ImageOption[src]

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. (C++ enum variant: Gamma = 6)

pub const Quality: ImageOption[src]

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. (C++ enum variant: Quality = 7)

pub const Name: ImageOption[src]

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. (C++ enum variant: Name = 8)

pub const SubType: ImageOption[src]

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". (C++ enum variant: SubType = 9)

pub const IncrementalReading: ImageOption[src]

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. (C++ enum variant: IncrementalReading = 10)

pub const Endianness: ImageOption[src]

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. (C++ enum variant: Endianness = 11)

pub const Animation: ImageOption[src]

Image formats that support animation return true for this value in supportsOption(); otherwise, false is returned. (C++ enum variant: Animation = 12)

pub const BackgroundColor: ImageOption[src]

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. (C++ enum variant: BackgroundColor = 13)

pub const ImageFormat: ImageOption[src]

The image's data format returned by the handler. This can be any of the formats listed in QImage::Format. (C++ enum variant: ImageFormat = 14)

pub const SupportedSubTypes: ImageOption[src]

Image formats that support different saving variants should return a list of supported variant names (QList<QByteArray>) in this option. (C++ enum variant: SupportedSubTypes = 15)

pub const OptimizedWrite: ImageOption[src]

. A handler which supports this option is expected to turn on optimization flags when writing. (C++ enum variant: OptimizedWrite = 16)

pub const ProgressiveScanWrite: ImageOption[src]

. A handler which supports this option is expected to write the image as a progressive scan image. (C++ enum variant: ProgressiveScanWrite = 17)

pub const ImageTransformation: ImageOption[src]

. A handler which supports this option can read the transformation metadata of an image. A handler that supports this option should not apply the transformation itself. (C++ enum variant: ImageTransformation = 18)

pub const TransformedByDefault: ImageOption[src]

. A handler that reports support for this feature will have image transformation metadata applied by default on read. (C++ enum variant: TransformedByDefault = 19)

Trait Implementations

impl Clone for ImageOption[src]

impl Copy for ImageOption[src]

impl Debug for ImageOption[src]

impl Eq for ImageOption[src]

impl From<ImageOption> for c_int[src]

impl From<i32> for ImageOption[src]

impl PartialEq<ImageOption> for ImageOption[src]

impl StructuralEq for ImageOption[src]

impl StructuralPartialEq for ImageOption[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.