[]
Represents picture formatting options for a shape.
This interface provides access to picture-specific properties such as brightness,
contrast, transparency, color transformation, cropping, image data, and linked picture
settings. An IPictureFormat object is typically obtained from
PictureFormat and applies to both regular pictures and linked
pictures.
public interface IPictureFormat
Public Interface IPictureFormat
worksheet.Range["A1:B2"].Value = new object[,] {
{"Name", "Value"},
{"Test", 100}
};
IShape picture = worksheet.Shapes.AddCameraPicture("=$A$1:$B$2", 20, 20);
IPictureFormat pictureFormat = picture.PictureFormat;
pictureFormat.TransparentBackground = true;
pictureFormat.Transparency = 0.5;
| Name | Description |
|---|---|
| Brightness | Gets or sets the brightness of the specified picture or OLE object. The returned value is a number from |
| ColorType | Gets or sets the type of color transformation applied to the specified picture. The returned value indicates whether the picture uses the default color transformation or a specific transformation such as Grayscale, BlackAndWhite, or Watermark. |
| Contrast | Gets or sets the contrast for the specified picture or OLE object.
The returned value is a number from |
| Crop | Returns the ICrop object that represents the cropping settings for the specified IPictureFormat object. Use the returned object to access or modify image cropping properties such as the source image size, image offsets, and the visible area of the picture. |
| CropBottom | Gets or sets the number of points that are cropped off the bottom of the specified picture. Use this property to determine how much of the source image is hidden from the bottom edge of the picture. |
| CropLeft | Gets or sets the number of points that are cropped off the left side of the specified picture. Use this property to determine how much of the source image is hidden from the left edge of the picture. |
| CropRight | Gets or sets the number of points that are cropped off the right side of the specified picture. |
| CropTop | Gets or sets the number of points that are cropped off the top of the specified picture. |
| Fill | Gets or sets the byte array of the specified picture. |
| Reference | Gets or sets the reference of the current picture. For a linked picture created from a cell range, the returned string identifies the source reference used by the picture. |
| Transparency | Gets or sets the degree of transparency of the specified picture.
The returned value ranges from |
| TransparentBackground | Gets or sets whether the specified picture format uses a transparent background. |
| Type | Returns the image type of the specified picture. Use this method to determine the picture format, such as PNG, JPG, or SVG, for a picture shape. |
| Url | Returns the URL of the picture from JSON. |