Replies: 1 comment
-
Do you have a complete repro you can share, along with input image? My guess is you've got input images that have orientation metadata embedded, which will be auto-corrected when using the default |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I am using orientation to rotate the image. I am using 90 to rotate but sometimes it is rotating 180 sometimes it is rotating 270 sometimes it doesn't even rotate
if (angle < 0) { angle = 360 - angle; } switch (angle) { case 90: var orientation = Orientation.Rotate90; transforms.Add(new OrientationTransform(orientation)); break; case 180: orientation = Orientation.Rotate180; transforms.Add(new OrientationTransform(orientation)); break; case 270: orientation = Orientation.Rotate270; transforms.Add(new OrientationTransform(orientation)); break; default: throw new ArgumentException("Only 90/180/270 degree rotation is supported"); }
using (var pl = MagicImageProcessor.BuildPipeline(sourceStream, settings)) { foreach (var transform in transforms) { pl.AddTransform(transform); } pl.WriteOutput(stream); }
Beta Was this translation helpful? Give feedback.
All reactions