Skip to content

Commit

Permalink
Merge pull request #28 from bz2/fix_cpu_ext_example
Browse files Browse the repository at this point in the history
Fix README example for CPU extentions
  • Loading branch information
Cykooz authored May 30, 2024
2 parents 95d7d5c + a0e9149 commit ff0d17e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,12 @@ fn main() {

### Change CPU extensions used by resizer

```rust, ignore
```rust, no_run
use fast_image_resize as fr;
fn main() {
let mut resizer = fr::Resizer::new(
fr::ResizeAlg::Convolution(fr::FilterType::Lanczos3),
);
let mut resizer = fr::Resizer::new();
#[cfg(target_arch = "x86_64")]
unsafe {
resizer.set_cpu_extensions(fr::CpuExtensions::Sse4_1);
}
Expand Down

0 comments on commit ff0d17e

Please sign in to comment.