Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bigaston/equi-to-planet
https://github.com/bigaston/equi-to-planet
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bigaston/equi-to-planet
- Owner: Bigaston
- Created: 2021-04-18T22:06:54.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-04-18T22:09:24.000Z (over 3 years ago)
- Last Synced: 2024-10-12T23:51:04.087Z (3 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Equi to Planet
Transform an Equirectangular image to LittlePlanetPort of this algorithm : [https://math.stackexchange.com/questions/607353/tiny-planet-algorithm/2110192](https://math.stackexchange.com/questions/607353/tiny-planet-algorithm/2110192)
## Usage :
```JS
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
```JS
equi.changeMaxMb(sizeInMb);
```