public static Size GetOrientatedSize(ISize media, MediaOrientation orientation) { switch (orientation) { case MediaOrientation.Transpose: case MediaOrientation.Rotate90: case MediaOrientation.Transverse: case MediaOrientation.Rotate270 : return new Size(media.Height, media.Width); default : return new Size(media.Width, media.Height); } }
public MediaTransformation(IMediaSource source, MediaOrientation orientation, string format) : this(source, format) { Transform(orientation.GetTransforms()); }