# Converting Base64 to Images (solved)

**URL:** <https://forums.powershell.org/t/converting-base64-to-images-solved/7878>\
**Category:** PowerShell Help\
**Created:** [January 18, 2017, 7:32pm UTC](https://forums.powershell.org/t/converting-base64-to-images-solved/7878 "2017-01-18T19:32:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gazza](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/gazza/32/130_2.png) [@gazza](https://forums.powershell.org/u/gazza)\
**Post date:** [January 18, 2017, 7:32pm UTC](https://forums.powershell.org/t/converting-base64-to-images-solved/7878/1 "2017-01-18T19:32:59Z")

</div>

Hi guys, I am trying to convert base64 to files using the code below. It works fine from powershell console, but I am launching this from an external program and it fails here with the error below.

```
Exception calling "Save" with "2" argument(s): "A generic error occurred in GDI+."
At \\server\path\filename.ps1:151 char:2
+ $Image.Save($outFile,$SRC_FileType)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ExternalException
```

Edit: Was stupid permissions error on location that I was saving to… My bad…

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:39pm UTC](https://forums.powershell.org/t/converting-base64-to-images-solved/7878/2 "2024-05-16T20:39:24Z")

</div>


