private Media.PixelFormat Convert( Bitmap.Config config ) { if ( config != null && config.Name() != null ) { switch ( config.Name().ToLower() ) { case "alpha_8": return Media.PixelFormat.A8; case "rgb_565": return Media.PixelFormat.R5G6B5; case "argb_4444": return Media.PixelFormat.A4R4G4B4; case "argb_8888": return Media.PixelFormat.A8R8G8B8; default: LogManager.Instance.Write( "[AndroidImageCodec] Failed to find conversion for Bitmap.Config.{0}.", config.Name() ); return Media.PixelFormat.Unknown; } } return Media.PixelFormat.Unknown; }