Created
October 28, 2013 15:56
-
-
Save mreidsma/7199436 to your computer and use it in GitHub Desktop.
A quick Bash script to convert a folder full of .pngs to .tiffs @ 300dpi for book figures. (Handy for books with lots of screen shots)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| for file in ~/Desktop/old_figures/* | |
| do | |
| sips --setProperty dpiHeight 300.000 --setProperty dpiWidth 300.000 --setProperty format tiff --setProperty formatOptions lzw $file --out ~/Desktop/new_figures/`basename $file .png`.tiff | |
| done |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put yer old 72 dpi png screen shots in a folder on your desktop called "old_figures".
Make a new directory on yer desktop called "new_figures"
Open your favorite text editor. Paste this code in and save it as "convert." Put it on your desktop.
Open Terminal.app. Type:
cd ~/Desktop [hit enter]
Now type: ./convert
WATCH THE MAGIC HAPPEN.