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

{{< psd/tize >}}
## GetGrayscaleAlpha(int) {#getgrayscalealpha}

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

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

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

### Return Value

The GrayscaleAlpha color.

### See Also

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

---

## GetGrayscaleAlpha(int, int) {#getgrayscalealpha_1}

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

```csharp
public static PixelDataFormat GetGrayscaleAlpha(int bitsPerSample, int alphaChannelBits)
```

| Parameter | Type | Description |
| --- | --- | --- |
| bitsPerSample | Int32 | The number of bits per sample. |
| alphaChannelBits | Int32 | The number of bits per sample in the alpha channel. |

### Return Value

The GrayscaleAlpha color.

### See Also

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


