0.0.9 • Published 3 years ago

imgpocket v0.0.9

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

imgpocket

npm-version

Encode/Decode magic data pockets inside images

Example

https://codesandbox.io/s/imgpocket-x8jl2q

Installation

npm i imgpocket

Usage

import { encodeString, decodeString } from 'imgpocket';

// Encode:

const output = await encodeString(inputImage, JSON.stringify({ some: 'data' }));
output.toBlob((blob) => {
  window.open(URL.createObjectURL(blob));
});

// Decode:

const decoded = JSON.parse(await decodeString(encodedImage));
console.log(decoded); // { some: 'data' }
0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago