public static GetFormatFromName ( string name, bool accessibleOnly, bool caseSensitive ) : PixelFormat | ||
name | string | The string of format name |
accessibleOnly | bool | If true, non-accessible format will treat as invalid format, otherwise, all supported formats are valid. |
caseSensitive | bool | Should be set true if string match should use case sensitivity. |
return | PixelFormat |
public static PixelFormat GetFormatFromName( string name, bool accessibleOnly, bool caseSensitive )
{
// We are storing upper-case format names.
String tmp = caseSensitive ? name : name.ToUpper();
for ( int i = 0; i < (int)PixelFormat.Count; ++i )
{
PixelFormat pf = (PixelFormat)i;
if ( !accessibleOnly || IsAccessible( pf ) )
{
if ( tmp == GetFormatName( pf ) )
return pf;
}
}
return PixelFormat.Unknown;
}
PixelUtil::GetFormatFromName ( string name ) : PixelFormat | |
PixelUtil::GetFormatFromName ( string name, bool accessibleOnly ) : PixelFormat |