@@ -147,22 +147,22 @@ internal static UIImage GetPlatformImage(this CGImageSource cgImageSource, int s
147
147
if ( cgimage is null )
148
148
throw new InvalidOperationException ( "Unable to create CGImage from CGImageSource." ) ;
149
149
150
- image = new UIImage ( cgimage , scale , ToUIImageOrientation ( cgImageSource ) ) ;
150
+ image = new UIImage ( cgimage , scale , ToUIImageOrientation ( cgImageSource ) ) ;
151
151
}
152
152
153
153
return image ;
154
154
}
155
155
156
- static UIImageOrientation ToUIImageOrientation ( CGImageSource cgImageSource )
156
+ static UIImageOrientation ToUIImageOrientation ( CGImageSource cgImageSource )
157
157
{
158
- var props = cgImageSource . GetProperties ( 0 ) ;
158
+ var props = cgImageSource . GetProperties ( 0 ) ;
159
159
if ( props is null || props . Orientation is null )
160
160
return UIImageOrientation . Up ;
161
161
162
- return ToUIImageOrientation ( props . Orientation . Value ) ;
162
+ return ToUIImageOrientation ( props . Orientation . Value ) ;
163
163
}
164
164
165
- static UIImageOrientation ToUIImageOrientation ( CIImageOrientation cgOrient ) => cgOrient switch {
165
+ static UIImageOrientation ToUIImageOrientation ( CIImageOrientation cgOrient ) => cgOrient switch {
166
166
CIImageOrientation . TopLeft => UIImageOrientation . Up ,
167
167
CIImageOrientation . TopRight => UIImageOrientation . UpMirrored ,
168
168
CIImageOrientation . BottomRight => UIImageOrientation . Down ,
@@ -171,8 +171,7 @@ static UIImageOrientation ToUIImageOrientation (CGImageSource cgImageSource)
171
171
CIImageOrientation . RightTop => UIImageOrientation . Right ,
172
172
CIImageOrientation . RightBottom => UIImageOrientation . RightMirrored ,
173
173
CIImageOrientation . LeftBottom => UIImageOrientation . Left ,
174
- _ => throw new ArgumentOutOfRangeException ( nameof ( cgOrient ) ) ,
174
+ _ => throw new ArgumentOutOfRangeException ( nameof ( cgOrient ) ) ,
175
175
} ;
176
-
177
176
}
178
177
}
0 commit comments