Skip to content

Instantly share code, notes, and snippets.

@scbedd
Created June 22, 2021 18:34
Show Gist options
  • Save scbedd/457e5615ce81b0a168d591336973f0be to your computer and use it in GitHub Desktop.
Save scbedd/457e5615ce81b0a168d591336973f0be to your computer and use it in GitHub Desktop.
Decode QR Image Given Base64 Encoded PNG
$inputFile = "your-qr-image.PNG"
$file = "re-rewritten.txt";
$test_out = "re-out.png"
# to base64
[System.Convert]::ToBase64String((Get-Content $inputFile -AsByteStream)) | Set-Content $file
# back to bytes
[Convert]::FromBase64String((Get-Content $file)) | Set-Content $test_out -AsByteStream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment