Hello David
Great work. There is a lot to learn from you. I was wondering if there is a way that we can reduce the size of the images. When you save the image they are like 23 KB, etc. All of them are in 20Kbs and above 15 Kbs. Can you give any pointers if know.
Regards,
Navin Pathuru
How to reduce the size of the images?
Re: How to reduce the size of the images?
Hi Navin,
There are parameters you can use with the PNG encoder (I think the tradeoff here is compression versus speed) and also with the JPEG encoder (here the tradeoff will be compression versus quality). These parameters are not exposed via the JFreeChart API yet (in the ChartUtilities class), but I am having a look at it.
Regards,
DG.
There are parameters you can use with the PNG encoder (I think the tradeoff here is compression versus speed) and also with the JPEG encoder (here the tradeoff will be compression versus quality). These parameters are not exposed via the JFreeChart API yet (in the ChartUtilities class), but I am having a look at it.
Regards,
DG.
Re: How to reduce the size of the images?
In the ChartUtilities-class you already use:
private static final int DEFAULT_PNG_COMPRESSION = 9;
which is the maximum compression level in this case.
Have you evaluated other png-encoders.
Regards,
Stefan
private static final int DEFAULT_PNG_COMPRESSION = 9;
which is the maximum compression level in this case.
Have you evaluated other png-encoders.
Regards,
Stefan