请问批量修改图片大小的工具有哪些?
Tofloor
poster avatar
liujy126
deepin
2020-05-02 19:44
Author
如题,win下我一般fs系列的小工具 ,不知道linux下有没有
Reply Favorite View the author
All Replies
avatar
ghostry
deepin
2020-05-02 20:03
#1
分享下我用的nemo右键脚本

  1. #!/bin/bash
  2. for name in $NEMO_SCRIPT_SELECTED_FILE_PATHS
  3. do
  4. ext=$(echo "$name"|awk -F '.' '{print $NF}'| tr 'A-Z' 'a-z');
  5. if [ "$ext" = "jpg" ] || [ "$ext" = "jpeg" ] || [ "$ext" = "png" ];then
  6.         mogrify -resize "1600x1600>" "$name"
  7. else
  8.         notify-send "仅支持jpg和png格式" "$name的格式为$ext"
  9.         #zenity --info --text="仅支持jpg和png格式"
  10. fi
  11. done
Copy the Code
Reply View the author
avatar
liujy126
deepin
2020-05-02 20:42
#2
一脸懵逼
Reply View the author
avatar
tice
deepin
2020-05-02 20:43
#3
apt install imagemagick

convert --help

Reply View the author
avatar
不会开车有驾照
deepin
2020-05-02 21:12
#4
刚有人问得converseen好像就是
Reply View the author
avatar
不会开车有驾照
deepin
2020-05-02 21:13
#5
我靠,刚看了看,原来就是你问的
Reply View the author
avatar
liujy126
deepin
2020-05-02 21:35
#6
本帖最后由 liujy126 于 2020-5-2 13:37 编辑
https://bbs.deepin.org/post/193473
刚有人问得converseen好像就是

这个没什么用处,没法更改图片的尺寸,只能更改质量
Reply View the author