I am having trouble generating the appropriate java code in order to use this method
save
public void save(javax.imageio.stream.ImageOutputStream ios)
I am currently passing in the file name to this method
save
public void save(java.lang.String fileName)
However for our web version we only have easy access to the relative path - therefore I want to retrieve the jpg file in memory then write it to disk outside of teechart.
Sample code would be very helpful.
Creating a jpg in memory
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi cathy,
You can save a chart to a stream doing something like this:
Hope this helps!
You can save a chart to a stream doing something like this:
Code: Select all
ImageOutputStream ios = ImageIO.createImageOutputStream( new FileOutputStream(fileName));
chart1.getExport().getImage().getJPEG().save(ios);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |