jpeg « Development « JFreeChart Q&A





1. saving as JPEG    jfree.org

i want to save my chart as a JPEG file.I use the next method: saveChartAsJPEG(File f,JFreeChart j,int a,int b); but ... i got an error as ... cannot resolve symbol: variable f in class X at line 57, column 19 must i create this file first? where must i create it? or should i import this file from other place...? Please ...

2. JFreeChart to gif or jpeg file?    jfree.org

Here is a class I added to the JRefinery jar file to save a file to JPEG: package com.jrefinery.chart.image; import java.awt.*; import java.awt.geom.*; import java.awt.image.*; import java.io.*; import com.jrefinery.chart.*; import com.sun.image.codec.jpeg.*; public class JPEG { public static void saveToFile(JFreeChart chart, String aFileName, int width, int height, double quality) throws FileNotFoundException, IOException { BufferedImage img = draw( chart, width, height ); FileOutputStream ...

3. Force download of JPEG    jfree.org

Hi, My servlet creates a JFreeChart with the writeChartAsJPEG function. The chart itself is created properly. I would like to allow the user to open or save the file via a dialog box, but IE recognises the file type and displays the chart in the browser. I have been searching the Internet for ages now and haven't found a solution to ...

4. Problem writing chart as JPEG    jfree.org

Hi all, I'm using ChartUtilities.writeChartAsJPEG(...) in a servlet to write the chart to the response's output stream. Before today, I was using a quite old version of JFreeChart, 1.0.0-rc1. Charts were displayed fine on my web pages. Today I just switched to 1.0.9, and charts suddenly were not displayed anymore (using both firefox and IE). Switched to PNG and that works ...

5. print out jfreechart as *.jpeg    jfree.org

6. Saving Chart as JPEG or PNG Bug ??    jfree.org

Hi, I have created a swing program with JFreeChart that allows a user to optionally save a graph. I call the writeJPEG() or writePNG() functions and I receive notification that they have finished writing the graph. Sometimes when I open the image file (possibly too shortly after obtaining the message), there is no image shown. However, in the thumbnail view there ...