Expand description
§fimg
Provides fast image operations, such as rotation, flipping, and overlaying.
§Organization
Image types:
Image: the main image type.DynImage: This is the image type you use when, say, loading a png. You should immediately convert this into aImageCloner: This is… aImage, but about to be cloned. It just allows some simple out-of-place optimizations, that.clone().op()dont allow. (produce withImage::cloner)uninit::Image: A uninitialized image. Used for performance optimization.
§Operations
Affine:
Drawing:
Image::box,Image::filled_box,Image::stroked_boxImage::circle,Image::border_circleImage::line,Image::thick_lineImage::pointsImage::quadImage::poly,Image::border_polyImage::triImage::text
Scaling: Image::scale
Misc image ops:
§feature flags
scale: enables thescalemodule.save: enablesImage::save, via thepngcrate.text: enablesImage::text, via thefontduecrate.blur: enablesImage::blur, via thestackblurcrate.real-show:Image::show, if thesavefeature is enabled, will, by default, simply open the appropriate image viewing program. if, for some reason, this is inadequate/you dont have a good image viewer, enable thereal-showfeature to makeImage::showopen up a window of its own. without thereal-showfeature,Image::showwill save itself to your temp directory, which you may not want.term:term::print. this enables printing images directly to the terminal, if you don’t want to open a window or something. supports{iterm2, kitty, sixel, fallback}graphics.default: [save,scale].
Modules§
- builder
- safe builder for the image
- indexed
- indexed images! whoo! (palette and
Image<[u8], 1>, basically.) - pixels
- module for pixels ops.
- scale
scale - holds scaling operations.
- term
term - terminal outputs produces output for any terminal supporting one of the
- uninit
- the houser of uninitialized memory. €$@!0В!℡
Macros§
- make
- Create a
Image<[u8; N], C>with ease. If your looking for aImage<&’static [u8]>, tryImage::make.
Structs§
- Image
- A image with a variable number of channels, and a nonzero size.
- Image
Cloner - A neat way to clone a image.
- SubImage
- A smaller part of a larger image.
Enums§
- DynImage
- Dynamic image.
Can be any of {
Y8,YA8,RGB8,RGB16}.
Traits§
- Blending
Overlay - This blends the images together, like
imageops::overlay. - Blending
Overlay At - Blending overlay at.
- Cloner
Overlay Overlaybut owned- Cloner
Overlay At OverlayAtbut owned- Cropper
- Trait for cropping a image.
- Overlay
- Trait for layering images ontop of each other.
Think
magick a b -layers flatten a - Overlay
At - Trait for layering a image ontop of another, with a offset to the second image.
- Pack
- packs and unpacks this pixel
note that
unpack(pack(p))may not equalp - ReadPng
save - Read png.
- Write
Png save - Write a png image.