Asked by:
Bitmap.save(path) isn't working

Question
-
i'm trying to do some image processing using on webform.
when i'm done with processing i tried to save the new image on a folder on server so that i would be able to show that using asp:image control and allow user to download that.
to save new file i used
bmp.Save(path);
but it's not working and again isn't producing any error.
please help
- Moved by Figo Fei Wednesday, October 20, 2010 6:24 AM (From:Visual C# General)
Tuesday, October 19, 2010 12:16 PM
All replies
-
The follwoing code will save the BackgroundImage of panel to a file names a.png. Try this
Dim b As Bitmap
b = Panel3.BackgroundImage
b.Save("c:\a.png", Imaging.ImageFormat.Png)Its VB.NET code convert it into c#.NET. Please let me know if you need help on this.
Thanks and Regards, Bharath S.Tuesday, October 19, 2010 12:32 PM -
The follwoing code will save the BackgroundImage of panel to a file names a.png. Try this
Dim b As Bitmap
b = Panel3.BackgroundImage
b.Save("c:\a.png", Imaging.ImageFormat.Png)Its VB.NET code convert it into c#.NET. Please let me know if you need help on this.
Thanks and Regards, Bharath S.i'm working with webform. and the control that contains image is asp:image server control. and it doesn't give me image directly.
well i'm done with image editing and displaying using following code
protected void btnGray_Click(object sender, EventArgs e) { Image1.ImageUrl = "mobile.aspx"; Image2.Visible = true; Image2.ImageUrl = "mobile.aspx"; }
and on mobile.aspx
but now when i download the image then it downloads with name mobile.aspx how to change this name?paint.Class1 pnt = new Class1(); static System.Drawing.Image img123; protected void Page_Load(object sender, EventArgs e) { // Bitmap bmp = new Bitmap(img); string path = Path.GetFullPath("images"); img123= System.Drawing.Image.FromFile(path + @"\123.jpg"); pnt.image = img123; img123 = (System.Drawing.Image)pnt.Implement(Class1.command.Gray); img123.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); }
Regards Kumar Gaurav. Please Mark as an answer in case the post is helpful to you so that it became helpful to othersTuesday, October 19, 2010 2:39 PM -
For ASP.NET questions, please use forums.asp.net
Thanks for your understanding.
Figo Fei
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg@microsoft.com
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Wednesday, October 20, 2010 6:18 AM