[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.CellPicture.ImageData

ImageData Property

ImageData

Gets a copy of the image binary data.

Declaration
public byte[] ImageData { get; }
Public ReadOnly Property ImageData As Byte()
Property Value
Type Description
byte[]

A copy of the image binary data, or null if no image data exists. Modifying the returned array does not affect the data stored in this CellPicture.

Examples
byte[] imageBytes = System.Convert.FromBase64String(
    "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+aF9sAAAAASUVORK5CYII=");
worksheet.Range["A1"].CellPicture = new CellPicture(imageBytes, "Company logo");
CellPicture picture = worksheet.Range["A1"].CellPicture;
byte[] copiedImageData = picture.ImageData;