An open API service indexing awesome lists of open source software.

https://github.com/leetcode-opensource/image-trick

Hide some messages into a image
https://github.com/leetcode-opensource/image-trick

Last synced: 3 months ago
JSON representation

Hide some messages into a image

Awesome Lists containing this project

README

          

# image-trick

Hide some messages into a image

```
➜ image-trick git:(master) ✗ yarn start -h
yarn run v1.12.0
$ node src/index.js -h
Usage: index [options]

Options:
-V, --version output the version number
-i, --image set source image, e.g. https://abc.com/d.jpg
-t, --text set shown text
-s, --spliter set spliter
-c, --codec set codec, default: "hex,base64", accept: [hex, base64, jwt] e.g. "hex,jwt"
-H, --height set height, e.g. 40 or 50%, and width will be computed to keep aspect ratio
-h, --help output usage information
```

Generate a ascii image containing encoded messages:

```
$ yarn start -H 20 --text hohoho --codec hex,base64

Used args:
--------------------
- image: https://upload.wikimedia.org/wikipedia/commons/d/d9/Edsger_Wybe_Dijkstra.jpg
- text: hohoho
- spliter: //////
- codec: hex,base64
--------------------

----------------
code: Njg2ZjY4NmY2ODZm
decoded: hohoho
----------------

fetching and generating...
```

![generated file](./assets/generated.png)