Getting your image ready
1. Crop your image down to 70 px by 70 px with your desired subject in the middle.
2. Desaturate your image completely / convert it to greyscale.
3. Adjust the levels in your photo so that it spans the full range from white to black. (This will affect some images more than others.)
4. If there is any part of the image you’d like to exclude from the pattern (ie. the background), replace it with a solid true red fill (RGB = 255,0,0).
Working the code
- Download Processing from their website.
- Open up DigitalArtisanalPortraitMaker.pde. You can download the zip file here, or copy & paste the raw text from here (no download required). Note: If you copy & pasted the code instead of downloading the zip file, you’ll also need to add ZapfDingbats.ttf or some other symbol font to the data folder.
- Change the name of your 70 px by 70 px image to MyPic.jpg and place it in the folder at DigitalArtisanalPortraitMaker/data. Note: if you downloaded the zip file, this should replace my sample image.
- Read through the comments in the .pde file to find out how to adjust the output colors and color threshold.
- Press the play button in Processing!
- While looking at your sketch, press the R key to export your pattern and a rendered stitch image. They’ll show up as pdf files in the DigitalArtisanalPortraitMaker folder.
- Share your work on Instagram and tag @digital_artisanal!