nypl-spacetime / map-vectorizer

An open-source map vectorizer
MIT License
648 stars 57 forks source link

use PIL to calculate average color #20

Closed mgiraldo closed 10 years ago

mgiraldo commented 10 years ago

use PIL to calculate average color and remove dependency on ImageMagick

see http://www.sintacks.com/2012/06/python-calculating-average-color-of.html to replace lines #325-327 in https://github.com/NYPL/map-vectorizer/blob/e482596284dd96160efb3717d6018a19592ed6fe/vectorize_map.py#L325

mgiraldo commented 10 years ago

Solved using @tlevine's average color code: https://github.com/tlevine/map-vectorizer/blob/tom/pixel_color.py