Skip to content
This repository has been archived by the owner on Nov 1, 2018. It is now read-only.
/ halftone_basic Public archive

Basic class to make svg halftones from a png. Utilizes chunky_png.

Notifications You must be signed in to change notification settings

idlehands/halftone_basic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

halftone_basic

Basic class to make svg halftones from a png. Utilizes chunky_png. This can be seen in action at https://xylotones.com.

The algorithm breaks the image into square blocks, based off of a user parameter, analyzes the pixels in that block, determining the average color for the block, and assigns a gray value to it. The block's x-coordinate, y-coordinate, and gray value are returned. There is a simple method that then writes an svg file from that, using the gray value to determine the circle's radius.

#to-do

  • interface with image, using chunky_png
  • break down image into square "chunks" based on a parameter
  • process each chunk, find a corresponding gray and return chunk coordinates and gray value
  • CONVERT to a module
  • provide options for output format
  • optimize algorithm
  • add offset for every other row

About

Basic class to make svg halftones from a png. Utilizes chunky_png.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages