Is there a way to export a Picture as a bitmap like the Chart.ToImage, similar to the images created when using office automation to save the excel file as a HTMl document?
You may use Picture.Data property, it will extract the image in bytes of array (binary data).
See the following code below:
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets;
Picture pic = worksheet.Pictures;
string fileName = "d:\\test\\myimage.Jpg";
FileStream file = File.Create(fileName);
byte data = pic.Data;
file.Write(data, 0, data.Length);
Excellent - thanks!
I've got to testing this and can't find the Picture.Data property - also checked the online API (http://www.aspose.com/Products/Aspose.Cells/Api/index.html?url=http://www.aspose.com/Products/Aspose.Cells/Api/Aspose.Cells.PictureMembers.html)
and can't find this property.
Please try the attached fix.
We will update the document of Aspose.Cells.