com.trolltech.qt.gui
Enum QImage.Format

java.lang.Object
  extended by java.lang.Enum<QImage.Format>
      extended by com.trolltech.qt.gui.QImage.Format
All Implemented Interfaces:
QtEnumerator, java.io.Serializable, java.lang.Comparable<QImage.Format>
Enclosing class:
QImage

public static enum QImage.Format
extends java.lang.Enum<QImage.Format>
implements QtEnumerator

The following image formats are available in all versions of Qt.

ConstantValueDescription
Format_Invalid0The image is invalid.
Format_Mono1The image is stored using 1-bit per pixel. Bytes are packed with the most significant bit (MSB) first.
Format_MonoLSB2The image is stored using 1-bit per pixel. Bytes are packed with the less significant bit (LSB) first.
Format_Indexed83The image is stored using 8-bit indexes into a colormap.
Format_RGB324The image is stored using a 32-bit RGB format (0xffRRGGBB).
Format_ARGB325The image is stored using a 32-bit ARGB format (0xAARRGGBB).
Format_ARGB32_Premultiplied6The image is stored using a premultiplied 32-bit ARGB format (0xAARRGGBB), i.e. the red, green, and blue channels are multiplied by the alpha component divided by 255. (If RR, GG, or BB has a higher value than the alpha channel, the results are undefined.) Certain operations (such as image composition using alpha blending) are faster using premultiplied ARGB32 than with plain ARGB32.

The following image format is specific to Qtopia Core:

ConstantValueDescription
Format_RGB167The image is stored using a 16-bit RGB format (5-6-5).

See Also:
format, convertToFormat

Enum Constant Summary
Format_ARGB32
          The image is stored using a 32-bit ARGB format (0xAARRGGBB).
Format_ARGB32_Premultiplied
          The image is stored using a premultiplied 32-bit ARGB format (0xAARRGGBB), i.e. the red, green, and blue channels are multiplied by the alpha component divided by 255.
Format_Indexed8
          The image is stored using 8-bit indexes into a colormap.
Format_Invalid
          The image is invalid.
Format_Mono
          The image is stored using 1-bit per pixel.
Format_MonoLSB
          The image is stored using 1-bit per pixel.
Format_RGB16
          The image is stored using a 16-bit RGB format (5-6-5).
Format_RGB32
          The image is stored using a 32-bit RGB format (0xffRRGGBB).
NImageFormats
          Internal.
 
Method Summary
static QImage.Format resolve(int value)
           
 int value()
           
static QImage.Format valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static QImage.Format[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Format_Invalid

public static final QImage.Format Format_Invalid

The image is invalid.


Format_Mono

public static final QImage.Format Format_Mono

The image is stored using 1-bit per pixel. Bytes are packed with the most significant bit (MSB) first.


Format_MonoLSB

public static final QImage.Format Format_MonoLSB

The image is stored using 1-bit per pixel. Bytes are packed with the less significant bit (LSB) first.


Format_Indexed8

public static final QImage.Format Format_Indexed8

The image is stored using 8-bit indexes into a colormap.


Format_RGB32

public static final QImage.Format Format_RGB32

The image is stored using a 32-bit RGB format (0xffRRGGBB).


Format_ARGB32

public static final QImage.Format Format_ARGB32

The image is stored using a 32-bit ARGB format (0xAARRGGBB).


Format_ARGB32_Premultiplied

public static final QImage.Format Format_ARGB32_Premultiplied

The image is stored using a premultiplied 32-bit ARGB format (0xAARRGGBB), i.e. the red, green, and blue channels are multiplied by the alpha component divided by 255. (If RR, GG, or BB has a higher value than the alpha channel, the results are undefined.) Certain operations (such as image composition using alpha blending) are faster using premultiplied ARGB32 than with plain ARGB32.


Format_RGB16

public static final QImage.Format Format_RGB16

The image is stored using a 16-bit RGB format (5-6-5).


NImageFormats

public static final QImage.Format NImageFormats
Internal.

Method Detail

values

public static final QImage.Format[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(QImage.Format c : QImage.Format.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static QImage.Format valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

value

public int value()
Specified by:
value in interface QtEnumerator

resolve

public static QImage.Format resolve(int value)