Batch Resize: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
| No edit summary | No edit summary | ||
| Line 3: | Line 3: | ||
| To install ImageMagick: (on Debian/Ubuntu based systems) | To install ImageMagick: (on Debian/Ubuntu based systems) | ||
| sudo apt-get install imagemagick | '''sudo apt-get install imagemagick | ||
| To resize only: | To resize only: | ||
| find . -iname '*.jpg' -exec convert {} -resize 640x480 {} \; | '''find . -iname '*.jpg' -exec convert {} -resize 640x480 {} \; | ||
| To resize and convert to another format (example converts JPEG to PNG): | To resize and convert to another format (example converts JPEG to PNG): | ||
| find . -iname '*.jpg' -exec convert {} -resize 640x480 {}.png \; | '''find . -iname '*.jpg' -exec convert {} -resize 640x480 {}.png \; | ||
Revision as of 16:33, 4 September 2014
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: (on Debian/Ubuntu based systems)
sudo apt-get install imagemagick
To resize only:
find . -iname '*.jpg' -exec convert {} -resize 640x480 {} \;
To resize and convert to another format (example converts JPEG to PNG):
find . -iname '*.jpg' -exec convert {} -resize 640x480 {}.png \;