Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net
 SPC Control Chart Tools for .Net
 How to save BufferedImage image to local disc?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sakamali

Turkey
33 Posts

Posted - 14 Oct 2014 :  10:44:33  Show Profile  Reply with Quote
Hi,
In your sample solution, there is a stream like this:

BufferedImage chartimage = new BufferedImage(chartVu, ImageFormat.Jpeg);


How can I save this image to my local disc in Asp.Net?
Thanks in advance.

Edited by - sakamali on 14 Oct 2014 10:50:47

sakamali

Turkey
33 Posts

Posted - 15 Oct 2014 :  01:55:33  Show Profile  Reply with Quote
With this code block, I take an error like this:


Go to Top of Page

quinncurtis

1586 Posts

Posted - 15 Oct 2014 :  08:50:55  Show Profile  Reply with Quote
Asp.Net and Windows place restrictions on where a web app can actually place files, to keep malicious web apps from trashing a computer. That is a general Asp.net topic of discussion and you can Google the topic to read more about it. Here is one article: http://forums.asp.net/t/1220571.aspx?Save+image+from+ASP+Image+to+file+on+server . You can use code similar to below to get a local app folder you can save the file to.

String rootfolder = Server.MapPath("~"); // returns the root folder the executing asp.net app
String filepath = rootfolder + "spcchart.jpg";
chartimage.SaveImage(filepath);


Go to Top of Page

sakamali

Turkey
33 Posts

Posted - 15 Oct 2014 :  09:34:14  Show Profile  Reply with Quote
Hi,
Thanks for your answer. It is useful for us.
Best Regards.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07