63 releases
Uses new Rust 2024
| 0.4.55 | Apr 7, 2026 |
|---|---|
| 0.4.53 | Mar 3, 2026 |
| 0.4.51 | Dec 21, 2025 |
| 0.4.50 | Oct 21, 2025 |
| 0.4.28 | Nov 23, 2023 |
#433 in Images
Used in 4 crates
220KB
4.5K
SLoC
fimg
quick simple image operations
supported operations
- overlay
- rotation
- flipping
- image tiling
- image scaling
- triangle drawing
- line drawing
- box drawing
- polygon drawing
- circle drawing
- text drawing
- blur
lib.rs:
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].
Dependencies
~0.3–49MB
~732K SLoC