Skip to main content
.NET Framework Class Library
Image..::.Flags Property

Gets attribute flags for the pixel data of this Image.

Namespace: System.Drawing
Assembly: System.Drawing (in System.Drawing.dll)
Syntax
<BrowsableAttribute(False)> _
Public ReadOnly Property Flags As Integer
[BrowsableAttribute(false)]
public int Flags { get; }
[BrowsableAttribute(false)]
public:
property int Flags {
	int get ();
}
[<BrowsableAttribute(false)>]
member Flags : int

Property Value

Type: System..::.Int32
The integer representing a bitwise combination of ImageFlags for this Image.
Remarks

The integer value returned from this method will correspond to a sum of ImageFlags, as described in the following table.

ImageFlag value

Integer representation

ImageFlagsNone

0

ImageFlagsScalable

1

ImageFlagsHasAlpha

2

ImageFlagsHasTranslucent

4

ImageFlagsPartiallyScalable

8

ImageFlagsColorSpaceRGB

16

ImageFlagsColorSpaceCMYK

32

ImageFlagsColorSpaceGRAY

64

ImageFlagsColorSpaceYCBCR

128

ImageFlagsColorSpaceYCCK

256

ImageFlagsHasRealDPI

4096

ImageFlagsHasRealPixelSize

8192

ImageFlagsReadOnly

65536

ImageFlagsCaching

131072

For example, if the Flags property for an image returned 77960, the ImageFlags for the image would be ReadOnly, HasRealDpi, HasRealPixelSize, ColorSpaceYcbcr, and PartiallyScalable.

Version Information

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Platforms

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Microsoft is conducting an online survey to understand your opinion of the MSDN Web site. If you choose to participate, the online survey will be presented to you when you leave the MSDN Web site.

Would you like to participate?