Your PowerGUI Community: Simplify your PowerShell related GUI and script editing needs.


Uploading images to a program using powershell

This question is not answered

Its like, I have a folder containing 2000+ jpg images and have other folders at some other location with name 1, 1.33, 1.5, 2 with are basically ratio names.  I want if powershell could upload those images and crop them according to the closest aspect ratios(1, 1.33,1.5, 2) and save into respective ratio folder.

Or tell this software http://ekot.dk/programmer/JPEGCrops/ to upload image and use its functions to crop image to closest ratio and save to respective ratio 1, 1.33, 1.5, 2 folder.

if you are not able to understand, its like:

powershell uploads images from "C:\images\"folder

check each image' ratio, by width/height

if(ratio is closest to any 1, 1.33, 1.5, 2 ) crop into that

then save it into respective 1, 1.33, 1.5, 2 folder.

I'm a newbie, so sorry if it is not possible.

Thanks

All Replies
  • This might point you in the right direction
    http://blogs.msdn.com/b/powershell/archive/2009/03/31/image-manipulation-in-powershell.aspx
  • I've used WIA in vbScript and it works quite well. Good link!