Last active
June 25, 2018 21:55
-
-
Save glegoux/05941ffd1bbc3d5c1c7bebb22e3a08fe to your computer and use it in GitHub Desktop.
[Bash] Convert base 64 to image PNG and create image file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd $(dirname "$0") | |
file_b64="$1" | |
image_file="${2:-image.png}" | |
cat "${file_b64}" | base64 -d > "${image_file}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment