Commit c9889d0
committed
feat(core): 新增 WebP 图像压缩功能
在 `Cargo.toml` 和 `crates/core/Cargo.toml` 中添加了对 `webp` 库的依赖,以支持 WebP 图像格式的压缩。
在 `crates/core/src/image.rs` 中修改了图像压缩和缩略图生成的逻辑,使用 `webp::Encoder` 进行 WebP 格式的图像压缩。更新了注释以明确说明压缩为有损 WebP 格式。1 parent 81772e7 commit c9889d0
4 files changed
+42
-10
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
129 | 128 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
135 | 132 | | |
136 | 133 | | |
137 | 134 | | |
| |||
0 commit comments