> For the complete documentation index, see [llms.txt](https://docs.wisej.com/system.drawing.managed/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wisej.com/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.pixelformat.md).

# PixelFormat

Namespace: **System.Drawing.Imaging**

Assembly: **System.Drawing.Managed** (4.0.0.0)

Specifies the format of the color data for each pixel in the image.

{% tabs %}
{% tab title="C#" %}

```csharp
public enum PixelFormat : Enum
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Enum PixelFormat As [Enum]
```

{% endtab %}
{% endtabs %}

## Fields

| Name                     | Description                                                                                                                                                                                                                        |
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Alpha**                | Specifies that pixel data contains alpha values that are not pre-multiplied.                                                                                                                                                       |
| **Canonical**            | The default pixel format of 32 bits per pixel. The format specifies 24-bit color depth and an 8-bit alpha channel.                                                                                                                 |
| **DontCare**             | Specifies that pixel format is a don't care.                                                                                                                                                                                       |
| **Extended**             | Reserved.                                                                                                                                                                                                                          |
| **Format16bppArgb1555**  | Specifies that pixel format is 16 bits per pixel. The color information specifies 32768 shades of color of which 5 bits are red, 5 bits are green, 5 bits are blue and 1 bit is alpha.                                             |
| **Format16bppGrayScale** | The pixel format is 16 bits per pixel. The color information specifies 65536 shades of gray.                                                                                                                                       |
| **Format16bppRgb555**    | Specifies that pixel format is 16 bits per pixel. The color information specifies 65536 shades of gray.                                                                                                                            |
| **Format16bppRgb565**    | Specifies that pixel format is 16 bits per pixel. The color information specifies 32768 shades of color of which 5 bits are red, 5 bits are green and 5 bits are blue.                                                             |
| **Format1bppIndexed**    | Specifies that pixel format is 1 bit per pixel indexed color. The color table therefore has two colors in it.                                                                                                                      |
| **Format24bppRgb**       | Specifies that pixel format is 24 bits per pixel. The color information specifies 16777216 shades of color of which 8 bits are red, 8 bits are green and 8 bits are blue.                                                          |
| **Format32bppArgb**      | Specifies that pixel format is 32 bits per pixel. The color information specifies 16777216 shades of color of which 8 bits are red, 8 bits are green and 8 bits are blue. The 8 additional bits are alpha bits.                    |
| **Format32bppPArgb**     | Specifies that pixel format is 32 bits per pixel. The color information specifies 16777216 shades of color of which 8 bits are red, 8 bits are green and 8 bits are blue. The 8 additional bits are pre-multiplied alpha bits.     |
| **Format32bppRgb**       | Specifies that pixel format is 24 bits per pixel. The color information specifies 16777216 shades of color of which 8 bits are red, 8 bits are green and 8 bits are blue.                                                          |
| **Format48bppRgb**       | Specifies that pixel format is 48 bits per pixel. The color information specifies 16777216 shades of color of which 8 bits are red, 8 bits are green and 8 bits are blue. The 8 additional bits are alpha bits.                    |
| **Format4bppIndexed**    | Specifies that pixel format is 4 bits per pixel indexed color. The color table therefore has 16 colors in it.                                                                                                                      |
| **Format64bppArgb**      | Specifies pixel format is 64 bits per pixel. The color information specifies 16777216 shades of color of which 16 bits are red, 16 bits are green and 16 bits are blue. The 16 additional bits are alpha bits.                     |
| **Format64bppPArgb**     | Specifies that pixel format is 64 bits per pixel. The color information specifies 16777216 shades of color of which 16 bits are red, 16 bits are green and 16 bits are blue. The 16 additional bits are pre-multiplied alpha bits. |
| **Format8bppIndexed**    | Specifies that pixel format is 8 bits per pixel indexed color. The color table therefore has 256 colors in it.                                                                                                                     |
| **Gdi**                  | Specifies that pixel data contains GDI colors.                                                                                                                                                                                     |
| **Indexed**              | Specifies that pixel data contains color indexed values which means they are an index to colors in the system color table, as opposed to individual color values.                                                                  |
| **Max**                  | Specifies that pixel format is 64 bits per pixel. The color information specifies 16777216 shades of color of which 16 bits are red, 16 bits are green and 16 bits are blue. The 16 additional bits are alpha bits.                |
| **PAlpha**               | Specifies that pixel format contains pre-multiplied alpha values.                                                                                                                                                                  |
| **Undefined**            | Specifies that pixel format is undefined.                                                                                                                                                                                          |

## Used By

| Name                                                                                                                     | Description                                                                                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Bitmap.Clone](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.pixelformat.md)                 | Creates a copy of the section of this [Bitmap](/system.drawing.managed/api/system.drawing/system.drawing.bitmap.md) defined by with a specified [PixelFormat](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.pixelformat.md). |
| [Bitmap.LockBits](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.pixelformat.md)              | Locks a portion of the bitmap for direct pixel manipulation.                                                                                                                                                                                             |
| [Image.PixelFormat](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.pixelformat.md)            | Gets the pixel format for this [Image](/system.drawing.managed/api/system.drawing/system.drawing.image.md).                                                                                                                                              |
| [Image.GetPixelFormatSize](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.pixelformat.md)     | Returns the color depth, in number of bits per pixel, of the specified pixel format.                                                                                                                                                                     |
| [Image.IsAlphaPixelFormat](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.pixelformat.md)     | Returns a value that indicates whether the pixel format for this [Image](/system.drawing.managed/api/system.drawing/system.drawing.image.md) contains alpha information.                                                                                 |
| [Image.IsExtendedPixelFormat](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.pixelformat.md)  | Returns a value that indicates whether the pixel format is 64 bits per pixel.                                                                                                                                                                            |
| [Image.IsCanonicalPixelFormat](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.pixelformat.md) | Returns a value that indicates whether the pixel format is 32 bits per pixel.                                                                                                                                                                            |
| [BitmapData.PixelFormat](/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.pixelformat.md)       | Gets or sets the format of the pixel information in this [Bitmap](/system.drawing.managed/api/system.drawing/system.drawing.bitmap.md).                                                                                                                  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wisej.com/system.drawing.managed/api/system.drawing.imaging/system.drawing.imaging.pixelformat.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
