Skip to content

Convert square image to 45° angled, circle shaped halftone

Notifications You must be signed in to change notification settings

Postcard/halftone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

halftone

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

Installation

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 

Example

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}`)
})

halftone.jpg

About

Convert square image to 45° angled, circle shaped halftone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published