1.0.0 • Published 3 years ago
equi-to-planet v1.0.0
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);
1.0.0
3 years ago