-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# ImgResizer | ||
|
||
批量图片等比缩放工具,同时支持单独文件 | ||
支持 png 格式、gif 格式、jpeg 格式 | ||
|
||
## 使用方法 | ||
|
||
``` | ||
Usage: ImgResizer -source {source} -dest {dest} -mode {mode} | ||
-dest string | ||
Destination file or directory | ||
-height int | ||
Destination height (default 128) | ||
-help | ||
Show help message | ||
-mode int | ||
0 - (Default) Nearest-neighbor interpolation | ||
1 - Bilinear interpolation | ||
2 - Bicubic interpolation | ||
3 - Mitchell-Netravali interpolation | ||
4 - Lanczos resampling with a=2 | ||
5 - Lanczos resampling with a=3 | ||
-source string | ||
Source file or directory | ||
-width int | ||
Destination width (default 300) | ||
``` | ||
|
||
## 示例批量处理 | ||
|
||
``` | ||
ImgResizer -source ~/Desktop/pics -dest ~/Desktop/new_pics -mode 5 | ||
``` | ||
|
||
## 示例单独处理 | ||
|
||
``` | ||
ImgResizer -source ~/pics/hello.gif -dest ~/newpics/wow.gif -width 900 | ||
``` | ||
|