# Enum oxipng::png::BitDepth [−] [src]

    pub enum BitDepth {
        One,
        Two,
        Four,
        Eight,
        Sixteen,
    }

The number of bits to be used per channel per pixel

## Variants

`One` | One bit per channel per pixel |
`Two` | Two bits per channel per pixel |
`Four` | Four bits per channel per pixel |
`Eight` | Eight bits per channel per pixel |
`Sixteen` | Sixteen bits per channel per pixel |

## Methods

### `impl BitDepth`

#### `fn as_u8(&self) -> u8`

Retrieve the number of bits per channel per pixel as a `u8`

#### `fn from_u8(depth: u8) -> BitDepth`

Parse a number of bits per channel per pixel into a `BitDepth`

## Trait Implementations

### `impl Display for BitDepth`

#### `fn fmt(&self, f: &mut Formatter) -> Result`

### Derived Implementations

### `impl Copy for BitDepth`

### `impl Clone for BitDepth`

#### `fn clone(&self) -> BitDepth`

#### `fn clone_from(&mut self, source: &Self)`1.0.0

### `impl PartialEq for BitDepth`

#### `fn eq(&self, __arg_0: &BitDepth) -> bool`

#### `fn ne(&self, other: &Rhs) -> bool` 1.0.0

### `impl Debug for BitDepth`

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)