Created
June 22, 2021 18:34
-
-
Save scbedd/457e5615ce81b0a168d591336973f0be to your computer and use it in GitHub Desktop.
Decode QR Image Given Base64 Encoded PNG
This file contains hidden or 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
$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