https://github.com/ozansz/image-data-uri-generator
A shell script that generates base64 encoded URI data from image files
https://github.com/ozansz/image-data-uri-generator
Last synced: 3 months ago
JSON representation
A shell script that generates base64 encoded URI data from image files
- Host: GitHub
- URL: https://github.com/ozansz/image-data-uri-generator
- Owner: ozansz
- License: mit
- Created: 2018-09-21T22:41:44.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-21T23:25:39.000Z (almost 7 years ago)
- Last Synced: 2025-02-12T20:15:41.470Z (5 months ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image Data URI Generator
A shell script that generates base64 encoded URI data from image files
## Usage
First clone the repository to your local machine:
```shell
git clone https://github.com/ozansz/image-data-uri-generator
cd image-data-uri-generator
```And run `gen.sh`:
```shell
chmod +x gen.sh
./gen.sh foobar.png
```The command above generates the data URI of `foobar.png` and prints to the terminal.
To save the generated data URI to a file, pass the file name as the second argument.
The command below saves the generated data URI of `foo.png` to `bar.txt`.```shell
./gen.sh foo.png bar.txt
```## Script Arguments
`gen.sh [outfile]`
* `file`: The image file which data URI will be generated
* `outfile`: The output file which the generated URI will be written to