我终于找到了解决方案:使用-scale
而不是-resize
可以解决问题。它位于标题缩放-像素平均值最小化下,因此一开始我没注意到它,一直在寻找放大而不是缩小。
mogrify.exe -scale 1600% utRmU.png
- Stef这对我有用:
convert input.png -interpolate Integer -filter point -resize "10000%" output.png
解释:
display -sample 400%
对我很有效。
“通过直接对来自图像的原始像素进行采样,简单地更改图像大小。放大时,像素被复制成块。缩小时,像素被子采样(即跳过一些行和列)。”
https://imagemagick.org/script/command-line-options.php#sample
-interpolate nearest-neighbor
或-interpolate integer
。-interpolative-resize
。请注意,-resize
与-interpolate
不正确地配合使用。您可以在imagemagick文档中这里查看。convert input.png -interpolate nearest-neighbor -interpolative-resize 1600% output.png