Making gifs

ffmpeg \
-i yourFile.mov \
-r 15 \
-vf scale=512:-1 \
-ss 00:00:03 -to 00:00:06 \
ffmpeg -i demo.mov -vf "fps=15,scale=800:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif




magick image.jpg -strip -interlace Plane -gaussian-blur 0.05 -quality 85% -resize 75% result.jpg
# compress all jpg in folder
magick *.jpg -strip -interlace Plane -gaussian-blur 0.05 -quality 85% result.jpg
#parent folder
convert *.jpg -strip -interlace Plane -gaussian-blur 0.05 -quality 85% -set filename:f '%t_web' ../'%[filename:f].jpg'
# into target folder in same directory
mogrify *.jpg -strip -interlace Plane -gaussian-blur 0.05 -quality 85% -path ../web *.jpg
# into target folder in parent directory
mogrify *.jpg -strip -interlace Plane -gaussian-blur 0.05 -quality 85% -path web *.jpg

Change file format

  • Your EPS file is in CMYK colorspace. You need to convert it to sRGB before processing it


white bg
black bg
mogrify -background white -flatten -format jpg *.png
// single
convert Chun.png -background red -flatten png_small.jpg
// and compress
convert moom_ref.png -format jpg -quality 85% test.jpg
convert moom_ref.png -format jpg -strip -interlace Plane -gaussian-blur 0.05 -quality 85% test.jpg
convert *.png -alpha off image.jpg
// batch
magick mogrify -format jpg *.png


mogrify -format png -density 100 -colorspace sRGB -background transparent -units PixelsPerInch -resize 2475x3525 *.eps

Extract alpha from PNG

mogrify -set colorspace RGB -alpha extract -format jpg *.png

Extract alpha from white

convert test.jpg -fuzz 50% -transparent white result.png
mogrify -fuzz 50% -transparent white -set colorspace RGB -alpha extract -format jpg *.png
// batch add alpha from white in pngs, save to new folder
mogrify -fuzz 50% -transparent white -set colorspace RGB -alpha extract -format jpg -path ../mask *.png

Extract color from image

// select red, fill rest with black
convert test.png -fill white -fuzz 10% -opaque red output.jpg
// has black outline
convert test.png -fill black -fuzz 20% -opaque red -transparent black output.png
convert test.png -fill black -fuzz 5% -opaque red -transparent black output.png
mogrify -fill black -fuzz 5% -opaque red -transparent black output.jpg *png
// select red only
convert test.png -fill black -fuzz 20% -opaque #B93C3C -transparent black output.png

Converting images to black or a fill color

//batch overwrite
mogrify -format jpg -fill black -background black -colorize 100% *.jpg


+*.gif +*.jpg +*.png +*.mp4

Ultimate Mac environment setup


ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install youtube-dl
brew install python
brew install imagemagick
brew install ghostscript
brew install npm
brew install storyboarder
$ sudo easy_install pip
$ sudo pip install --upgrade pip
brew install caskroom/cask/brew-cask
#update xcode
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
brew cask install google-chrome
brew cask install obs
brew cask install streamlabs-obs
brew cask install clipgrab
brew cask install spotify
brew cask install handbrake
brew cask install vlc
brew cask install easyfind
brew cask install station
brew cask install sync
brew cask google-backup-and-sync
brew cask install the-unarchiver
brew cask install zoomus
brew cask install alfred
brew cask install atom
brew cask install processing
# design
brew cask install figma
brew cask install blender
brew cask install adobe-creative-cloud
brew cask install zxpinstaller

Atom setup

#Go to Menu > Install Shell Commands
#run below
apm install adobe-script-runner atom-beautify prettier-atom atom-spotify2
atom-transpose case-keep-replace change-case copy-path duplicate-line-or-selection
editorconfig file-icons git-plus highlight-selected local-history project-manager
related set-syntax sort-lines sublime-style-column-selection tab-foldername-index
toggle-quotes atom-wrap-in-tag atom-ternjs autoclose-html
autocomplete-modules color-picker docblockr emmet emmet-jsx-css-modules
es6-javascript js-hyperclick hyperclick pigmentstree-view-copy-relative-path
lodash-snippets language-babel atom-jest-snippets one-dark-ui dracula-theme
##react-es7-snippets sync-settings linter-eslint

Get all DMG

open https://www.pureref.com/freedownload.php?build=OSX64.dmg&version=1.11.1&downloadKey=kwshPqIAWUNsGVwJYCjKag%3D%3D
#Microsoft Office
open https://login.microsoftonline.com/?whr=scad.edu
open https://depts.scad.edu/coronavirus/academic-software
# optimize
open https://apps.apple.com/us/app/magnet/id441258766?mt=12
open https://www.blackmagicdesign.com/products/davinciresolve/

Change screenshot directory

cd ~/desktop
mkdir screenshots
defaults write com.apple.screencapture location ~/desktop/screenshots
defaults write com.apple.screencapture type -string "png"
defaults write com.apple.screencapture disable-shadow -bool true
killall SystemUIServer