mapbox / spritezero

small opinionated sprites
Other
173 stars 62 forks source link

Optimize layout and image generation #76

Closed springmeyer closed 4 years ago

springmeyer commented 4 years ago

Spritezero has some inefficiencies in the image handling code. This fixes the problems.

Previously:

Now:

This closes https://github.com/mapbox/spritezero/issues/7

/cc @mapbox/static-apis @mapbox/map-design-api

springmeyer commented 4 years ago

Thinking about version to bump to for this change... While the public API has not broken, if any code using generateLayout was doing anything unique to the output (beyond just passing it to generateImage) then the mapnik.Image objects instead of encoded PNG buffers may cause issues.

So, I'm thinking it is safest to bump to 7.0.0 for when this is released.

@jseppi should I update the changelog and bump the version in this PR or should I do it in master after?

jseppi commented 4 years ago

should I update the changelog and bump the version in this PR or should I do it in master after?

@springmeyer: Either way is fine with me currently since there aren't any outstanding changes in master