Skip to content

byglimps/boomerang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh_banner_2 This library was built to generate a series of Boomerang's from a given array of base64 images. This service handles saving the images, manipulating the images and returning a gif with the boomerang. Inspired by Instagram and their 10 photo boomerang's along with phhhoto 's experimental camera platform. This library aims to provide funfun stories for the Glimps photobooth platform and run along the tiler service byglimps.

Getting started

import { Boomerang } from "boomerang-lib";

// receives an array of base64 images.
const story = new Boomerang(base64Images);

returns

{ "story": "/path/to/your/boomerang" }

Encoding images to base64

import fs from "fs";
import path from "path"

function base64_encode(filename) {
  const filepath = path.resolve(`images/${filename}`);

  const bitmap = fs.readFileSync(filepath);

  return new Buffer.from(bitmap).toString("base64");
}

Issues

  • Finalize package creation through npm.

Releases

No releases published

Packages

No packages published