0.0.9 • Published 2 years ago

imgpocket v0.0.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago