linux查看图像大小

Resizing images on Linux with gThumb is easy. However, I have a batch of images inside a folder. Manually resizing them will consume too much time.

使用gThumb在Linux上调整图像大小很容易。 但是,我在文件夹中有一批图像。 手动调整它们的大小将消耗太多时间。

How to automatically resize them on Linux with a script?

如何在Linux上使用脚本自动调整它们的大小?

You can use convert from ImageMagick together with bash script to resize images inside a directory.

您可以结合使用ImageMagick的convert和bash脚本来调整目录中图像的大小。

mkdir resize;
IFS=$(echo -en "nb");
for i in *; do echo $i; convert $i -resize 600^ resize/$i;
done

The script will make a new directory named “resize” in current directory, resize all images in current directory to smaller ones of width 600px, and store the resized images into “reisze”.

该脚本将在当前目录中创建一个名为“ resize”的新目录,将当前目录中的所有图像调整为宽度小于600px的较小图像,并将调整大小后的图像存储到“ reisze”中。

The line IFS=$(echo -en "nb") is a bash trick to handle situations where images file names have spaces.

IFS=$(echo -en "nb")是bash技巧,用于处理图像文件名带有空格的情况。

Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。

翻译自: https://www.systutorials.com/how-to-resize-a-batch-of-images-on-linux/

linux查看图像大小

linux查看图像大小_如何在Linux上调整一批图像的大小?相关推荐

  1. exfat最佳单元大小_如何在 Linux 上将 USB 盘格式化为 exFAT | Linux 中国

    本教程教你如何在 Linux 系统上以 exFAT 格式格式化 USB 盘.同时包括 GUI 和命令行两种方法.https://linux.cn/article-12294-1.html作者:Dimi ...

  2. linux wall命令_如何在Linux上使用wall命令

    linux wall命令 Fatmawati Achmad Zaenuri/Shutterstock.comFatmawati Achmad Zaenuri / Shutterstock.com Ne ...

  3. linux rar加压_如何在linux下解压缩rar格式的文件压缩包

    ######################################################### #老男孩笔记系列-如何在linux下解压缩rar格式的文件压缩包 #date:201 ...

  4. linux grep 排除_如何在Linux中排除Grep?

    linux grep 排除 grep is very useful tool used by a lot of tech guys. grep provides different functions ...

  5. linux yes 命令_如何在Linux上使用yes命令

    linux yes 命令 Fatmawati Achmad Zaenuri/Shutterstock.com Fatmawati Achmad Zaenuri / Shutterstock.com T ...

  6. linux管道使用_如何在Linux上使用管道

    linux管道使用 Fatmawati Achmad Zaenuri/Shutterstock.comFatmawati Achmad Zaenuri / Shutterstock.com Use L ...

  7. linux bash 变量_如何在Linux上的Bash中设置环境变量

    linux bash 变量 fatmawati achmad zaenuri/Shutterstock Fatmawati achmad zaenuri / Shutterstock There's ...

  8. linux dig命令_如何在Linux上使用dig命令

    linux dig命令 Fatmawati Achmad Zaenuri/ShutterstockFatmawati Achmad Zaenuri / Shutterstock The Linux d ...

  9. linux ip命令_如何在Linux上使用ip命令

    linux ip命令 Fatmawati Achmad Zaenuri/Shutterstock Fatmawati Achmad Zaenuri / Shutterstock You can con ...

最新文章

  1. 常见排序算法及其java实现
  2. Failed resolution of: Landroid/support/v7/internal/widget/TintManager;异常解决方法
  3. 数据结构--选择排序
  4. 深度学习目标检测相关论文资源合辑
  5. GDCM:gdcm::FileStreamer的测试程序
  6. java jdom 更新xml_Java中使用JDOM来修改XML文档(续前)
  7. ant design datepicker处理日期范围操作
  8. X264学习笔记(1)
  9. 14 PP配置-生产主数据-BOM相关-定义项目状态的缺省值
  10. 获取远程linux版本,远程批量获取Linux和Windos操作系统版本(内核)
  11. homebrew mac_借助Homebrew使从Mac到Linux的转换更加容易
  12. (08)Verilog HDL同步复位
  13. Uboot 启动流程分析
  14. App后台开发运维和架构实践学习总结(4)——APP的注册和登录功能设计
  15. spring事件监听器系列一:应用
  16. xhr的get和post请求的简单实现
  17. OO ALV 设置搜索帮助的三种方式 ONF4 EVENT
  18. 微信小程序:上传的图片显示旋转问题
  19. 蛋白和肽测序仪销量、收入、价格、毛利率及市场份额
  20. 电脑上总显示宽带连接服务器怎么办啊,电脑显示宽带已连接网页打不开怎么办...

热门文章

  1. MacBook安装RVM
  2. Kubernetes1.7新特性:支持绕过docker,直接通过containerd管理容器
  3. R语言输出csv文件乱码
  4. 云服务安装Tomcat
  5. 《软件开发本质论》读书笔记
  6. 本地IP跟localhost的区别
  7. shell 中的特殊符号的含义---留着以后自己查看
  8. 移动跨平台框架React Native状态栏组件StatusBar【16】
  9. ArCore支持的设备
  10. php 竞拍系统,在线竞拍系统的PHP实现框架