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, RGB, Palette, GrayA, RGBA};
pub use imageops::FilterType::{Triangle, Nearest, CatmullRom, Gaussian, Lanczos3};
pub use image::ImageFormat::{PNG, JPEG, GIF, WEBP, PPM, BMP, ICO};
pub use dynimage::DynamicImage::{ImageRgb8, ImageRgba8, ImageLuma8, ImageLumaA8};

Modules

bmp

Decoding of BMP Images

gif

Decoding of GIF Images

ico

Decoding 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

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

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