mirror of
https://github.com/Cykooz/fast_image_resize.git
synced 2026-10-08 01:11:09 +00:00
Foxed code example in README.md
This commit is contained in:
+2
-2
@@ -50,8 +50,8 @@ A lot of **breaking changes** have been done in this release:
|
||||
the crate into module `images`.
|
||||
- Added optional feature "image".
|
||||
It adds implementation of traits `IntoImageView` and `IntoImageViewMut` for the
|
||||
[DynamicImage](https://docs.rs/image/latest/image/enum.DynamicImage.html)
|
||||
type from the `image` crate. This implementation allows you to use `DynamicImage`
|
||||
[DynamicImage](https://docs.rs/image/latest/image/enum.DynamicImage.html) type
|
||||
from the `image` crate. This implementation allows you to use `DynamicImage`
|
||||
instances as arguments for methods of this crate.
|
||||
|
||||
Look at the difference between versions 3 and 4 on example
|
||||
|
||||
@@ -168,7 +168,7 @@ fn main() {
|
||||
dst_image.buffer(),
|
||||
dst_width,
|
||||
dst_height,
|
||||
ExtendedColorType::Rgba8,
|
||||
src_image.color().into(),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
@@ -219,9 +219,7 @@ fn main() {
|
||||
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();
|
||||
unsafe {
|
||||
resizer.set_cpu_extensions(fr::CpuExtensions::Sse4_1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user