jpeg-decoder:用Rust编写的JPEG解码器

时间:2024-05-30 12:45:35
【文件属性】:

文件名称:jpeg-decoder:用Rust编写的JPEG解码器

文件大小:4.82MB

文件格式:ZIP

更新时间:2024-05-30 12:45:35

hacktoberfest Rust

jpeg解码器 用于解码JPEG的Rust库。 例子 Cargo.toml: [ dependencies ] jpeg-decoder = " 0.1 " main.rs: extern crate jpeg_decoder as jpeg; use std :: fs :: File; use std :: io :: BufReader; fn main () { let file = File :: open ( "hello_world.jpg" ). expect ( "failed to open file" ); let mut decoder = jpeg :: Decoder :: new (BufReader :: new (file)); let pixels = decoder. decode (). expect ( "faile


网友评论