`-resize 10000x1000>` does not restrict size and creates huge image
> widthxheight> | Shrinks an image with dimension(s) larger than the corresponding width and/or height argument(s).
https://imagemagick.org/script/command-line-processing.php#geometry
With an image that has 1024x1024 dimensions (Planeton.png)
```
$ magick ~/Downloads/a/Planeton.png -resize "10000x10000>" ~/Downloads/foo1.png
$ ls -h ~/Downloads/foo1.png
-rw-r--r-- 1 user staff 1.6M Oct 4 20:53 ~/Downloads/foo1.png
```
```
$ cargo run -- ~/Downloads/a/Planeton.png -resize "10000x10000>" ~/Downloads/foo.png
$ ls -h ~/Downloads/foo.png
-rw-r--r-- 1 user staff 43M Oct 4 20:52 ~/Downloads/foo.png
```
Seems like the https://github.com/Shnatsel/wondermagick/blob/3f99e3842897c986479a47cfc4a2f4b4b56e3265/src/arg_parsers/resize.rs#L20 is not actually applied?
关闭于 2025-10-05 4 条评论