Picture

Overview

Picture is a class in Aspose.Cells FOSS for .NET.

Represents a picture (image) anchored to a worksheet. Pictures allow you to embed images directly into Excel worksheets. Supported image formats include JPEG, PNG, GIF, and BMP. The image format is automatically detected from the file extension or data magic bytes. Pictures are positioned by specifying anchor coordinates and can be resized by adjusting the anchor points. var workbook = new Workbook(); var worksheet = workbook.Worksheets[0]; // Add a picture from a file byte[] imageData = File.ReadAllBytes(“logo.png”); int pictureIndex = worksheet.Pictures.Add(5, 5, 10, 10, imageData); var picture = worksheet.Pictures[pictureIndex]; picture.Name = “Company Logo”;

Properties: Data, ImageType, LowerRightColumn, LowerRightRow, Name, UpperLeftColumn, and 1 more.

Description

Picture is a class in the Aspose.Cells FOSS library for .NET that exposes 0 methods and 7 properties for programmatic use.

The class also provides the ImageType property (gets the image type).

Properties

NameTypeAccessDescription
NamestringRead/WriteGets or sets the name.
UpperLeftRowintRead/WriteGets or sets the upper left row.
UpperLeftColumnintRead/WriteGets or sets the upper left column.
LowerRightRowintRead/WriteGets or sets the lower right row.
LowerRightColumnintRead/WriteGets or sets the lower right column.
ImageTypeImageTypeReadGets the image type.
Databyte[]Read/WriteGets or sets the data.

See Also