Crate image [] [src]

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

Reexports

pub use color::ColorType::Gray;
pub use color::ColorType::RGB;
pub use color::ColorType::Palette;
pub use color::ColorType::GrayA;
pub use color::ColorType::RGBA;
pub use imageops::FilterType::Triangle;
pub use imageops::FilterType::Nearest;
pub use imageops::FilterType::CatmullRom;
pub use imageops::FilterType::Gaussian;
pub use imageops::FilterType::Lanczos3;
pub use image::ImageFormat::PNG;
pub use image::ImageFormat::JPEG;
pub use image::ImageFormat::GIF;
pub use image::ImageFormat::WEBP;
pub use image::ImageFormat::PPM;
pub use image::ImageFormat::BMP;
pub use image::ImageFormat::ICO;
pub use dynimage::DynamicImage::ImageRgb8;
pub use dynimage::DynamicImage::ImageRgba8;
pub use dynimage::DynamicImage::ImageLuma8;
pub use dynimage::DynamicImage::ImageLumaA8;

Modules

bmp

Decoding and Encoding of BMP Images

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

ppm

Encoding of portable pixmap Images

tga

Decoding of TGA Images

tiff

Decoding and Encoding of TIFF Images

webp

Decoding of Webp Images

Structs

Frame

A single animation frame

Frames

Holds the frames of the animated image

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

DecodingResult

Result of a decoding process

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.

Traits

ConvertBuffer

Provides color conversions for whole image buffers.

GenericImage

A trait for manipulating images.

ImageDecoder

The trait that all decoders implement

Pixel

A generalized pixel.

Primitive

Primitive trait from old stdlib

Functions

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