Foxed code example in README.md

This commit is contained in:
Kirill Kuzminykh
2024-06-04 17:49:03 +03:00
parent 95d7d5c0d8
commit d7987faafd
2 changed files with 4 additions and 6 deletions
+2 -2
View File
@@ -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
+2 -4
View File
@@ -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);
}