Skip to main content
All docs
V24.1
Row

RangeImageOptions.BlackAndWhite Property

Specifies whether to save a cell range as a black and white image.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

public bool BlackAndWhite { get; set; }

Property Value

Type Description
Boolean

true to generate a black and white image; otherwise, false.

Remarks

The following example demonstrates how to save a cell range as a black and white image and exclude drawing objects from the output:

Spreadsheet - Export a Cell Range to a Black and White Image

var exportOptions = new RangeImageOptions
{
    BlackAndWhite = true,
    ExportDrawingObjects = false
};
worksheet.Range["B1:I25"].ExportToImage("RangeImage.png", ImageFileFormat.Png, exportOptions);
See Also