hi
i have able to send jpeg,png formats on the browser but for mobile application i need to send it in gif format.
the code part is
JFreeChart chart = ChartFactory.createPieChart(Title,dataset,false,false);
response.setContentType("image/png");
ChartUtilities.writeChartAsPNG(out, chart, 400, 300);
how can i set the image in gif format.
Please help
sending chart image in gif format
-
- Posts: 9
- Joined: Fri Jun 13, 2008 4:09 am
- Location: Japan
-
- Posts: 844
- Joined: Fri Oct 13, 2006 9:29 pm
- Location: Sunnyvale, CA
Re: sending chart image in gif format
GIF, or Graphics Interchange Format, is a patented image format and encoding/decoding algorithm. There have been some controversy over the licensing issues associated with GIF which is why few open source applications use GIF for images. The PNG, or Portable Network Graphics, is an ISO standard and, therefore, not subject to any licensing issues. As all geeks know, PNG stands for "PNG's not GIF" which has that nice recursive quality. Are the mobile devices only able to display GIF, or do they just assume all byte data is a GIF? If you send the image with the MIME type 'image/png', the device would certainly know the data should be interpreted as a PNG image.kapilkaps83 wrote:how can i set the image in gif format.
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
-
- Posts: 9
- Joined: Fri Jun 13, 2008 4:09 am
- Location: Japan
-
- Posts: 844
- Joined: Fri Oct 13, 2006 9:29 pm
- Location: Sunnyvale, CA
No, but Google can if you know which version of GifEncoder you are using. It seems that there are multiple classes with that name, but most seem like they take an Image object as part of the constructor and an OutputStream either as an argument to the constructor or a write method. It is important to note that most of these sites make a note about the possible patent implications, but that will probably not be an issue if you are just an individual.kapilkaps83 wrote:can u help?
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA