0.0.9 • Published 8 months ago

imgpocket v0.0.9

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

8 months ago

0.0.8

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago