1 2 3 4 5 6 7 8 9 10 |
# Codificar imagen a Base64 $path = ".\fich.png" $base64 = [System.Convert]::ToBase64String((Get-Content $path -Encoding Byte)) # Abrir en Google Chrome y ver la imagen codificada en Base64 Start-Process chrome "data:image/jpg;base64,$base64" # Guardar la imagen en Base64 como PNG $bytes = [Convert]::FromBase64String($base64) [IO.File]::WriteAllBytes("imagen.png", $bytes) |