aspdotnetuser
Programmer
Hi,
I want to allow the user to click a button which gets an image from the specified path and rotates it. I have the code working but I don't know how to display the rotated image.
The code I have at the moment gets the image from a local path on C:\ and rotates it and then saves the image again. However, the <asp:Image /> control doesn't seem to be able to read the local path and can only read from the server, and the image doesn't save to the server path so how can I display the image in the image control?
[blue]Bitmap bitmap1;
bitmap1 = (Bitmap)Bitmap.FromFile(@"C:\TestPic.bmp");
PictureBox PictureBox1 = new PictureBox();
PictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
PictureBox1.Image = bitmap1;
PictureBox1.Image.RotateFlip(RotateFlipType.Rotate90FlipNone);
bitmap1.Save(@"C:\TestPic.bmp");
Image1.ImageUrl = @"C:\TestPic.bmp";[/blue]
I want to allow the user to click a button which gets an image from the specified path and rotates it. I have the code working but I don't know how to display the rotated image.
The code I have at the moment gets the image from a local path on C:\ and rotates it and then saves the image again. However, the <asp:Image /> control doesn't seem to be able to read the local path and can only read from the server, and the image doesn't save to the server path so how can I display the image in the image control?
[blue]Bitmap bitmap1;
bitmap1 = (Bitmap)Bitmap.FromFile(@"C:\TestPic.bmp");
PictureBox PictureBox1 = new PictureBox();
PictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
PictureBox1.Image = bitmap1;
PictureBox1.Image.RotateFlip(RotateFlipType.Rotate90FlipNone);
bitmap1.Save(@"C:\TestPic.bmp");
Image1.ImageUrl = @"C:\TestPic.bmp";[/blue]