IGxImageFormat.Flags

Syntax

Flags: Integer;

Description

The Flags property returns image codec attributes.

Comments

Use the GxImageCodecFlags enumerable type to check attribute values.

Example

Executing the example requires that the file system contains the C:\Map.bmp image.

Sub UserProc;
Var
    Image: IGxImage;
    ImgFormat: IGxImageFormat;
    f: integer;
Begin
    Image := GxImage.FromFile("C:\Map.bmp");
    ImgFormat := Image.RawFormat;
    f := ImgFormat.Flags;
    If (f And GxImageCodecFlags.Encoder) > 0 Then
        Debug.WriteLine("codec supports encoding (saving)");
    End If;
    If (f And GxImageCodecFlags.Decoder) > 0 Then
        Debug.WriteLine("codec supports decoding (reading)");
    End If;
    If (f And GxImageCodecFlags.SupportBitmap) > 0 Then
        Debug.WriteLine("codec supports bitmap images");
    End If;
    If (f And GxImageCodecFlags.SupportVector) > 0 Then
        Debug.WriteLine("codec supports vector images (metafiles)");
    End If;
    If (f And GxImageCodecFlags.SeekableEncode) > 0 Then
        Debug.WriteLine("encoder requires output stream with search");
    End If;
    If (f And GxImageCodecFlags.BlockingDecode) > 0 Then
        Debug.WriteLine("decoder executes blocking during decoding");
    End If;
    If (f And GxImageCodecFlags.Builtin) > 0 Then
        Debug.WriteLine("codec is built in GDI+");
    End If;
End Sub UserProc;

After executing the example the development environment console displays information about attributes of the codec that uses the specified image.

See also:

IGxImageFormat