Hello, all.
I am currently working on a project where we have stored an image into our database - with a small and medium-sized version. Right now, I am writing code that will allow us to rotate that image, so that we can adjust it without needing to use any other tools. This is my code:
CODE
Image smallImage;
Image mediumImage;
smallImage = Image.FromStream(new MemoryStream(Wrapper.Picture.GetSmallData(pictureID)));
mediumImage = Image.FromStream(new MemoryStream(Wrapper.Picture.GetMediumData(pictureID)));
smallImage.RotateFlip(RotateFlipType.Rotate270FlipXY);
mediumImage.RotateFlip(RotateFlipType.Rotate270FlipXY);
MemoryStream small = new MemoryStream();
MemoryStream medium = new MemoryStream();
smallImage.Save(small,ImageFormat.Jpeg);
mediumImage.Save(medium,ImageFormat.Jpeg);
byte[] s = small.ToArray();
byte[] m = medium.ToArray();
And it works, except that over time it causes the pictures to lose quality.
Does anyone know of a way to implement the same functionality(rotating pictures) without loss of image quality through prolonged use?
Thanks,
Girasquid