PowerShell Image Resize Function

You may also like...

3 Responses

  1. Mark says:

    This is just what I am looking for but I’m not having any luck with it! I am getting “Exception calling “Save” with “3” argument(s): “A generic error occurred in GDI+.”

    Any ideas? I am running Windows 7. Do I need to call/load any objects/cmdlets for this to run? Thanks!

  2. Lewis says:

    Hi Mark, not that I’m aware of. The Add-Type call within the function handles the requirements. Perhaps with it being Windows 7 just check you have the latest PowerShell version and the latest .NET framework installed too. I probably writer this on Windows 8.1 so I assume that will have had .NET 4.5. Let me know if you’re still struggling after updating those and rebooting and I’ll spin up a Windows 7 machine to test.

    Sorry Mark, I found this in Spam of all places – Akismet being a little over zealous!

  3. Lewis says:

    Hi Mark, sorry for the late reply. I attempted to use the WordPress app on my phone but for some reason, the reply didn’t send – apologies! If you’re running on Windows 7, ensure you have the latest and greatest .NET 4.5.2 installed alongside the latest and greatest version of PowerShell. Version 4 should be OK as I’m pretty sure that’s what I developed it on. If you’re still struggling, let me know and I’ll see what I can do to help but please bear with me as I’m currently working internationally.

Discover more from lewisroberts.com

Subscribe now to keep reading and get access to the full archive.

Continue reading