1.0.0 • Published 3 years ago

equi-to-planet v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Equi to Planet

Transform an Equirectangular image to LittlePlanet

Port of this algorithm : https://math.stackexchange.com/questions/607353/tiny-planet-algorithm/2110192

Usage :

const equi = require("equi-to-planet");

equi.convert(imgBuffer)
  .then((planetBuffer) => {
    // Save file or export it somewhere
    // Mime type is image/jpeg
  })
  .catch((err) => {
    console.log(err);
  });

If you have a problem with memory, you can allocate more memory to JIMP with

equi.changeMaxMb(sizeInMb);