Skip to content

yammmt/slide-show-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slide-show-rs

Rust

Show images continuously like:

example image

Usage

Before compiling, make sure that your window size is defined in .env file. For example,

WINDOW_WIDTH=1920
WINDOW_HEIGHT=1080

To reduce preprocessing time, use --release option. It makes this program much faster.

cargo run --release

By default, this app shows all images in photo/ directory. If you want to replace it, please give the app directory path as an argument like cargo run --release photo/test.

If you got error(s), please confirm support status of minifb crate (repo).

Speed

The default speed is 5.0s, that is, shown image is changed if 5.0s passes. To change this speed, please input key ⬆️ or ➡️ to increase speed by 0.5s, input key ⬇️ or ⬅️ to decrease speed by 0.5s.

Note that real speed is affected by your machine spec.

Test

In many cases such as this repo's GitHub Actions, cargo test is enough.

But, if you got NSInternalInconsistencyException (macOS) and failed to test, test must be run with --test_threads=1 option. That is, run cargo test -- --test-threads=1.

Formatter

Use clippy and rustfmt before committing changes.

cargo clippy
cargo fmt

Links

The idea of image viewer comes from:

About

Simple slide show written in Rust

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages