Resize Image File

The script allow you to change size of image file. You may set fixed size or use automatic matching size of proportion.

Module can be installed manually by downloading file and using Import-Module cmdlet.

DOWNLOAD: Set-ImageSize

Importing the module

PS > Import-Module Convert-ImgageType.ps1

Prerequisites

Windows PowerShell 2.0

Examples of using the module (Source code of module is in attachment):

 

PowerShell
PS C:\> Get-ChildItem 'P:\test\*.jpg' | Set-ImageSize -Destination "p:\test2" -WidthPx 300 -HeightPx 375 -Verbose 
VERBOSE: Image 'P:\test\00001.jpg' was resize from 236x295 to 300x375 and save in 'p:\test2\00001.jpg' 
VERBOSE: Image 'P:\test\00002.jpg' was resize from 236x295 to 300x375 and save in 'p:\test2\00002.jpg' 
VERBOSE: Image 'P:\test\00003.jpg' was resize from 236x295 to 300x375 and save in 'p:\test2\00003.jpg'

Be the first to comment

Leave a Reply

Your email address will not be published.


*