Crate fimg

source ·
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 a
  • ImageCloner: This is… a Image, but about to be cloned. It just allows some simple out-of-place optimizations, that .clone().op() dont allow. (produce with Image::cloner)
  • uninit::Image: A uninitialized image. Used for performance optimization.

§Operations

Affine:

Drawing:

Scaling: Image::scale

Misc image ops:

§feature flags

  • scale: enables the scale module.
  • save: enables Image::save, via the png crate.
  • text: enables Image::text, via the fontdue crate.
  • blur: enables Image::blur, via the stackblur crate.
  • real-show: Image::show, if the save feature 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 the real-show feature to make Image::show open up a window of its own. without the real-show feature, Image::show will 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§

  • safe builder for the image
  • module for pixels ops.
  • scalescale
    holds scaling operations.
  • termterm
    terminal outputs produces output for any terminal supporting one of the
  • the houser of uninitialized memory. €$@!0В𴬔!℡

Macros§

Structs§

  • A image with a variable number of channels, and a nonzero size.
  • A neat way to clone a image.
  • A smaller part of a larger image.

Enums§

  • Dynamic image. Can be any of {Y8, YA8, RGB8, RGB16}.

Traits§