---
title: "PixelDataFormat.GetGrayscale"
url: "https://reference.aspose.com/psd/net/aspose.psd/pixeldataformat/getgrayscale/"
product: "Aspose.PSD for .NET API Reference"
description: "PixelDataFormat method. Gets Grayscale color with a specified number of bits per sample"
---

{{< psd/tize >}}
## PixelDataFormat.GetGrayscale method

Gets Grayscale color with a specified number of bits per sample.

```csharp
public static PixelDataFormat GetGrayscale(int bitsPerSample)
```

| Parameter | Type | Description |
| --- | --- | --- |
| bitsPerSample | Int32 | The number of bits per sample. |

### Return Value

The Grayscale color.

### See Also

* class [PixelDataFormat](../)
* namespace [Aspose.PSD](../../../aspose.psd/)
* assembly [Aspose.PSD](../../../)


