Difference between revisions of "Notes"
From Seychelles
Beachmaster (talk | contribs) (Created page with ' <pre> for i in *.tif do convert -quality 80 -geometry 400x300 $i /tmp/beach_processed/`basename $i .tif`.jpg; done</pre>') |
Beachmaster (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | <pre> | ||
+ | for i in *.jpg | ||
+ | do convert -quality 80 -geometry 400x300! $i /tmp/beach_processed/`basename $i .jpg`.jpg; | ||
+ | done | ||
− | |||
for i in *.tif | for i in *.tif | ||
− | do convert -quality 80 -geometry 400x300 $i /tmp/beach_processed/`basename $i .tif`.jpg; | + | do convert -quality 80 -geometry 400x300! $i /tmp/beach_processed/`basename $i .tif`.jpg; |
− | done</pre> | + | done |
+ | |||
+ | for i in *.jpg | ||
+ | do convert -quality 75 -geometry 100x78! $i /tmp/beach_processed/`basename $i .jpg`_thumb.jpg; | ||
+ | done | ||
+ | |||
+ | Create headers: | ||
+ | |||
+ | First run in images: | ||
+ | |||
+ | for i in *.jpg | ||
+ | do convert -quality 95 -geometry x800 $i /tmp/beach_originals/`basename $i .jpg`.jpg; | ||
+ | done | ||
+ | |||
+ | Thereafter: | ||
+ | |||
+ | #!/bin/bash | ||
+ | |||
+ | PROCESSED=/tmp/beach_processed | ||
+ | |||
+ | for I in *.jpg; do | ||
+ | echo -n "$I..." | ||
+ | convert -quality 85 -crop 800x350+0+0 -gravity Center $I ${PROCESSED}/${I} | ||
+ | echo cropped | ||
+ | done | ||
+ | |||
+ | |||
+ | Thereafter renamed all including header string: | ||
+ | for f in *.jpg; do mv $f `basename $f .jpg`_header.jpg; done; | ||
+ | |||
+ | </pre> |
Latest revision as of 15:26, 15 May 2011
for i in *.jpg do convert -quality 80 -geometry 400x300! $i /tmp/beach_processed/`basename $i .jpg`.jpg; done for i in *.tif do convert -quality 80 -geometry 400x300! $i /tmp/beach_processed/`basename $i .tif`.jpg; done for i in *.jpg do convert -quality 75 -geometry 100x78! $i /tmp/beach_processed/`basename $i .jpg`_thumb.jpg; done Create headers: First run in images: for i in *.jpg do convert -quality 95 -geometry x800 $i /tmp/beach_originals/`basename $i .jpg`.jpg; done Thereafter: #!/bin/bash PROCESSED=/tmp/beach_processed for I in *.jpg; do echo -n "$I..." convert -quality 85 -crop 800x350+0+0 -gravity Center $I ${PROCESSED}/${I} echo cropped done Thereafter renamed all including header string: for f in *.jpg; do mv $f `basename $f .jpg`_header.jpg; done;