Batch Resize: Difference between revisions
| No edit summary |  (→Why) | ||
| Line 1: | Line 1: | ||
| =Why= | =Why= | ||
| As of 2018, the OSE wiki has a strict upper file size limit of 1M as our [[OSE Server]] infrastructure is operating on a very limited budget. For more information on why this is necessary, see [[Mediawiki# | As of 2018, the OSE wiki has a strict upper file size limit of 1M as our [[OSE Server]] infrastructure is operating on a very limited budget. For more information on why this is necessary, see [[Mediawiki#$maxUploadSize]] | ||
| =Imagemagick= | =Imagemagick= | ||
Revision as of 21:55, 15 June 2018
Why
As of 2018, the OSE wiki has a strict upper file size limit of 1M as our OSE Server infrastructure is operating on a very limited budget. For more information on why this is necessary, see Mediawiki#$maxUploadSize
Imagemagick
All it takes is one line to resize a directory full of images to your desired size if you have the ImageMagick tools package installed. convert is a tool that comes with that package.
To install ImageMagick, go to Terminal and type: (on Debian/Ubuntu based systems)
sudo apt-get install imagemagick
To resize only, go to the directory of interest:
find . -iname '*.jpg' -exec convert {} -resize 640x480 {} \;
find . -iname '*.jpg' -exec convert {} -resize 960x720 {} \;
To resize and convert to another format (example converts JPEG to PNG):
find . -iname '*.jpg' -exec convert {} -resize 640x480 {}.png \;