# [−][src]Crate image

This crate provides native rust implementations of image encoders and decoders and basic image manipulation functions.

## Re-exports

`pub use color::ColorType::Gray;`
`pub use color::ColorType::GrayA;`
`pub use color::ColorType::Palette;`
`pub use color::ColorType::RGB;`
`pub use color::ColorType::RGBA;`
`pub use color::ColorType::BGR;`
`pub use color::ColorType::BGRA;`
`pub use imageops::FilterType::CatmullRom;`
`pub use imageops::FilterType::Gaussian;`
`pub use imageops::FilterType::Lanczos3;`
`pub use imageops::FilterType::Nearest;`
`pub use imageops::FilterType::Triangle;`
`pub use image::ImageFormat::BMP;`
`pub use image::ImageFormat::GIF;`
`pub use image::ImageFormat::ICO;`
`pub use image::ImageFormat::JPEG;`
`pub use image::ImageFormat::PNG;`
`pub use image::ImageFormat::PNM;`
`pub use image::ImageFormat::WEBP;`
`pub use flat::FlatSamples;`
`pub use dynimage::DynamicImage::ImageLuma8;`
`pub use dynimage::DynamicImage::ImageLumaA8;`
`pub use dynimage::DynamicImage::ImageRgb8;`
`pub use dynimage::DynamicImage::ImageRgba8;`
`pub use dynimage::DynamicImage::ImageBgr8;`
`pub use dynimage::DynamicImage::ImageBgra8;`

## Modules

bmp | Decoding and Encoding of BMP Images
dxt | Decoding of DXT (S3TC) compression
flat | Image representations for ffi.
gif | Decoding of GIF Images
hdr | Decoding of Radiance HDR Images
ico | Decoding and Encoding of ICO files
imageops | Image Processing Functions
jpeg | Decoding and Encoding of JPEG Images
math | Mathematical helper functions and types.
png | Decoding and Encoding of PNG Images
pnm | Decoding of netpbm image formats (pbm, pgm, ppm and pam).
tga | Decoding of TGA Images
tiff | Decoding and Encoding of TIFF Images
webp | Decoding of Webp Images

## Structs

Bgr | BGR colors
Bgra | BGR colors + alpha channel
Frame | A single animation frame
Frames | An implementation dependent iterator, reading the frames as requested
ImageBuffer | Generic image buffer
Luma | Grayscale colors
LumaA | Grayscale colors + alpha channel
MutPixels | Mutable pixel iterator
Pixels | Immutable pixel iterator
Rgb | RGB colors
Rgba | RGB colors + alpha channel
SubImage | A View into another image

## Enums

ColorType | An enumeration over supported color types and their bit depths
DynamicImage | A Dynamic Image
FilterType | Available Sampling Filters
ImageError | An enumeration of Image errors
ImageFormat | An enumeration of supported image formats. Not all formats support both encoding and decoding.
ImageOutputFormat | An enumeration of supported image formats for encoding.

## Traits

AnimationDecoder | AnimationDecoder trait
ConvertBuffer | Provides color conversions for whole image buffers.
GenericImage | A trait for manipulating images.
GenericImageView | Trait to inspect an image.
ImageDecoder | The trait that all decoders implement
ImageDecoderExt | ImageDecoderExt trait
Pixel | A generalized pixel.
Primitive | Primitive trait from old stdlib

## Functions

Bgr |
Bgra |
Luma |
LumaA |
Rgb |
Rgba |
guess_format | Guess image format from memory block
load | Create a new image from a Reader
load_from_memory | Create a new image from a byte slice
load_from_memory_with_format | Create a new image from a byte slice
open | Open the image located at the path specified. The image's format is determined from the path's file extension.
save_buffer | Saves the supplied buffer to a file at the path specified.

## Type Definitions

GrayAlphaImage | Sendable grayscale + alpha channel image buffer
GrayImage | Sendable grayscale image buffer
ImageResult | Result of an image decoding/encoding process
RgbImage | Sendable Rgb image buffer
RgbaImage | Sendable Rgb + alpha channel image buffer

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## 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`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)