- Download this project
- Unzip the archive
- cd to the project directory, e.g.
cd ~/Downloads/art_cmdline_magick
There are a few options for setting up this codebase/environment depending on your OS and preferences. You may need to use the sudo
command as a prefix for some commands depending on your system settings.
For OSX and Linux users, we suggest setting up this codebase/environment using Docker. You will need to create a Docker account to get access to the download link.
- Download and install docker here:
https://www.docker.com/products/docker-desktop
- cd to the project directory after making sure Docker Desktop is running, e.g.
cd ~/Downloads/art_cmdline_magick
- Run
docker build -t magick_image .
- Run
docker run -v "$(pwd):/art_cmdline_magick" -i -t magick_image bin/sh
- cd to the project directory now that you are working inside the Docker container
cd art_cmdline_magick
- Execute scripts as shown below in the "Script exection examples" section.
You can also set up this codebase/environment directly on your machine without using Docker.
- Install Python if you don't already have it (Python 2 comes standard with OSX) - Windows users can download here:
https://www.python.org/downloads/windows
- Make sure to choose the Add to Path options for Windows installer
- Install ImageMagick and make sure to select to add it to PATH if using the Windows installer -
https://www.imagemagick.org/script/download.php
- For Windows users, make sure you choose the same architecture type (32 or 64 bit) as your Python installation
- If you are on OSX and not using Docker, try using homebrew (or MacPorts):
brew install imagemagick
- To download homebrew, run
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- You can also install using OSX binaries as shown below in the "Installing ImageMagick from binaries via OSX" section.
- Install pip if you don't already have it (OSX pre-installed won't) - instructions here -
https://pip.pypa.io/en/stable/installing/
- Run
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
- Run
python get-pip.py
- Run
- cd to the project directory, e.g.
cd ~/Downloads/art_cmdline_magick
- Install the project requirements
python -m pip install -r requirements.txt
- Execute scripts as shown below in the "Script exection examples" section.
- Download the following archive -
https://imagemagick.org/download/binaries/ImageMagick-x86_64-apple-darwin17.7.0.tar.gz
- cd to the directory where you downloaded the archive, e.g.
cd ~/Downloads
- Unzip the directory to your root directory
sudo tar xvzf ImageMagick-x86_64-apple-darwin17.7.0.tar.gz -C /
- Run
export MAGICK_HOME="/ImageMagick-7.0.8"
- Run
export PATH="$MAGICK_HOME/bin:$PATH"
- Run
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib/"
- Execute scripts as shown below in the "Script exection examples" section.
Scripts are set to output files to the /output folder.
magick sprites/veto_side_step_south_east00.png output/jpeg_convert.jpg
magick sprites/veto_side_step_south_east*.png output/jpeg_convert%02d.jpg
magick sprites/veto_side_step_south_east00.png -scale 500% output/big.png
magick sprites/veto_side_step_south_east00.png -scale 10% -scale 1000% output/pixelated.png
magick montage sprites/veto_side_step_south_east*.png -tile 3x2 -geometry 200x200 -background transparent output/sprite_sheet.png
magick output/sprite_sheet.png -crop 200x200 output/tile_%02d.png
python scripts/sprite_sheet.py -d sprites -o output/sheet.png
python scripts/meme_machine.py
python scripts/rorschach.py