Image File Resizing Using the PowerShell Community Extensions

A reader asked me about using PowerShell to process image files.  While PowerShell doesn’t natively support doing this you could perform this task by using PowerShell’s support for .NET which supports image resizing.  However if you have the PowerShell Community Extensions (PSCX) installed you can do this pretty easily using cmdlets like so:

PS> Import-Bitmap .\Foo.jpg | Resize-Bitmap -Percent 50 | 
>> Export-Bitmap -path fooSmall.jpg -Format jpeg

Can you feel the power?!

psmdtag:cmdlet – Bitmap manipulation

Advertisements
This entry was posted in PSCX. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s