Under what circumstances would Shape.ToImage return a null?

image = shape.ToImage( imOrPrOptions );


Why would this code return a null? Or better yet, how can I change my code so it won’t return a null?

Hi,


Please give us your complete runnable sample code and template file to show the issue, we will check your issue soon.

Thank you.

I cannot attach. Too large.


What are my options?
Hi,

Please simplify your code / project, zip it and post it here, we will check it soon.

Thank you.

The code is simple:


Shape s = ws.Shapes[ 0 ];
Bitmap image = null;

ImageOrPrintOptions options = new ImageOrPrintOptions();
options.ImageFormat = ImageFormat.Png;
options.OnePagePerSheet = true;
options.HorizontalResolution = options.VerticalResolution = 600;

image = shape.ToImage( options );

Image is null.

See attachment on

<a href="https://forum.aspose.com/t/120202

This has the image in question.

Hi,


I can find the issue as you have mentioned. I think this might be due to the fact that this shape in Excel 2007 format is not supported. I have logged a ticket with an id: CELLSNET-40154. We will look into it soon.

Thank you.

Hi,


We may provide this feature later on as Aspose.Cells does not support to convert smart arts to image files currently.

Thank you.