Hi,
I am painting charts which has more than 56 columns in it.
So after 56, the colors repeat which is not authentic.
I want to have different colors for all the columns, but I don’t have it In the Palette.
And it doesn’t allow me to add a new Custom color in position 57 and above.
Giving the error “Invalid Palette Index”.
Please suggest some feasible work around.
Regards,
Aslam
Hi,
Thanks for your question.
You will have to replace the existing color of the palette. I mean, overwrite them with your desired colors.
Hi,
Hi,
I have problem with save format for toImage
well the next code trows exception
ByteArrayOutputStream pictureBytes = new ByteArrayOutputStream();
ImageOrPrintOptions imageOptions = new ImageOrPrintOptions ();
imageOptions.setSaveFormat( imageOptions.getSaveFormat());
aChart.toImage( pictureBytes, imageOptions );
How do I set 2007 excel format for generated images instead of 2003 excel colors?
If I use the next code
ImageOrPrintOptions imageOptions = new ImageOrPrintOptions ();
imageOptions.setImageFormat( ImageFormat.getPng() );
imageOptions.setHorizontalResolution( (int)(AsposeUtility.EXCEL_CHART_WIDTH * AsposeUtility.PIXELS_TO_POINTS) );
imageOptions.setVerticalResolution( (int)(AsposeUtility.EXCEL_CHART_HEIGHT * AsposeUtility.PIXELS_TO_POINTS) );
ByteArrayOutputStream pictureBytes = new ByteArrayOutputStream();
BufferedImage image = null;
aChart.toImage( pictureBytes, imageOptions );
byte[] data = pictureBytes.toByteArray();
Then image have colors as in 2003 excel, but I need colors for 2007.
Hi,
Please see the next code, I can’t change save format for image (7.0.2 and 7.0.3 Aspose cells)
if I set the same format then the method aChart.toImage( pictureBytes, imageOptions ); throws exception: java.lang.Exception: Image format(ICON) is not supported.
The attachment contains example then chart is added in excel as chart and as image(from Aspose toImage()).
ImageOrPrintOptions imageOptions = new ImageOrPrintOptions ();
imageOptions.setImageFormat( ImageFormat.getPng() );
imageOptions.setSaveFormat( imageOptions.getSaveFormat() );
imageOptions.setHorizontalResolution( (int)(AsposeUtility.EXCEL_CHART_WIDTH * AsposeUtility.PIXELS_TO_POINTS) );
imageOptions.setVerticalResolution( (int)(AsposeUtility.EXCEL_CHART_HEIGHT * AsposeUtility.PIXELS_TO_POINTS) );
ByteArrayOutputStream pictureBytes = new ByteArrayOutputStream();
// create new picture object
BufferedImage image = null;
try
{
// convert aspose chart object to image
aChart.toImage( pictureBytes, imageOptions );
Hi,