Last active
March 15, 2018 19:19
Revisions
-
benjaminblack revised this gist
Mar 15, 2018 . No changes.There are no files selected for viewing
-
benjaminblack revised this gist
Mar 15, 2018 . No changes.There are no files selected for viewing
-
benjaminblack revised this gist
Mar 12, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Crop border around edges with fuzziness: convert image -fuzz 1% -trim +repage output ``` Crop to portrait (9:16) at the center and scale down to specific height, at medium (30%) quality: ```bash for file in `ls *.jpg`; do convert "$file" -quality 30 -gravity center -crop 608x1080+0+0 -geometry x720 "portrait/$file"; done -
benjaminblack revised this gist
Mar 12, 2018 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,3 +20,9 @@ Crop border around edges with fuzziness: ```bash convert image -fuzz 1% -trim +repage output ``` Crop to portrait (9:16) at the center and scale down to specific height: ```bash for file in `ls *.jpg`; do convert "$file" -quality 30 -gravity center -crop 608x1080+0+0 -geometry x720 "portrait/$file"; done ``` -
benjaminblack renamed this gist
Mar 8, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
benjaminblack renamed this gist
Mar 8, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,12 +11,12 @@ done Crop transparent border around edges: ```bash convert image -trim +repage output ``` Crop border around edges with fuzziness: ```bash convert image -fuzz 1% -trim +repage output ``` -
benjaminblack revised this gist
Mar 8, 2018 . 2 changed files with 22 additions and 10 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,10 +0,0 @@ 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ Convert a directory of PNGs to JPEGs: ```bash for file in `ls *.png` do extension="${file##*.}" base="${file%.*}" convert "$file" -quality 60 "${base}.jpg" done ``` Crop transparent border around edges: ``` convert image -trim +repage output ``` Crop border around edges with fuzziness: ``` convert image -fuzz 1% -trim +repage output ``` -
benjaminblack revised this gist
Mar 8, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ Assuming the current directory contains a bunch of PNGs. ```bash for file in `ls *.png` do -
benjaminblack created this gist
Mar 8, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ ```bash for file in `ls *.png` do extension="${file##*.}" base="${file%.*}" convert "$file" -quality 60 "${base}.jpg" done ```