Convert a square image to 45° angled, circle shaped halftone.
"Halftone is the reprographic technique that simulates continuous tone imagery through the use of dots, varying either in size or in spacing, thus genereting a gradient effect". For more information about halftone images please refer to Wikipedia
This project is built on top of ImageMagick and paper.js. You first need to install ImageMagick, cairo and pango. Please follow installation documentation from paper.js and gm. Then:
git clone https://github.com/Postcard/halftone.git
cd halftone
npm run build
import halftone from './dist/index';
let options = {
size: 1024,
density: 3,
outputFile: 'halftone.jpg'
}
halftone('./resources/portrait.jpg').then((outputFile) => {
console.log(`Halftone image successfully created at ${outputFile}`)
})