Skip to content

Instantly share code, notes, and snippets.

Created October 17, 2016 02:11
What would you like to do?
Rotation BitmapSource
public static BitmapSource Rotation(this BitmapSource source, int angle)
if (source == null) throw new ArgumentNullException(nameof(source));
var transformedBitmap = new TransformedBitmap();
transformedBitmap.Source = source;
transformedBitmap.Transform = new RotateTransform(90);
return transformedBitmap;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment