Registry / other / stb-image

stb-image

JSON →
library0.3.0rscratesunverified

Bindings to the stb image encoding/decoding library for loading and saving images.

# Cargo.toml [dependencies] stb_image = "0.3.0"
INSTALL
IMPORT
SIG · STB-IMAGE
S
stb-image
otherrustv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

load
use stb_image::image::load;

Load an image from file using stb_image

use stb_image::image::load; fn main() -> Result<(), Box<dyn std::error::Error>> { let img = load("image.png")?; println!("Loaded image: {}x{}", img.width, img.height); Ok(()) }
Debug
Known issues
gotchaThe crate may not support all image formats; check documentation for supported types.
fix
Use a more comprehensive image crate like `image` if you need broader format support.
affects: >=0.3.0
Upgrade
Version history
0.3.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
stb-image — cargo add stb-image · libregistry