简体   繁体   中英

How to Crop and Convert all images in the directory and sub directories on Linux (command line)?

I have a main directory Pictures . Inside that directory there are hundreds of other directories. Inside those directories I have images. One main image and thumbnails generated from that image.

  • I need to crop and optimize all these images.
  • All images that have a width higher than 600px should be cropped down to max 600px. Other images should stay as it is.
  • All images should be optimized

How can I do this? Im in a Ubuntu server. (Need to use commands)

I don't know the exact answer to your solution, but for batch command line image editing, I would look into imagemagick. http://www.imagemagick.org/script/index.php

您可以尝试GIMP脚本: http : //www.gimp.org/tutorials/Basic_Batch/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM