Skip to content

Instantly share code, notes, and snippets.

@glegoux
Last active June 25, 2018 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glegoux/05941ffd1bbc3d5c1c7bebb22e3a08fe to your computer and use it in GitHub Desktop.
Save glegoux/05941ffd1bbc3d5c1c7bebb22e3a08fe to your computer and use it in GitHub Desktop.
[Bash] Convert base 64 to image PNG and create image file
#!/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