Following on closely from this Smart image search via Powershell
I have the following PowerShell script:-
Add-Type -Assembly System.Drawing
function Get-Image {
$input | ForEach-Object { [Drawing.Image]::FromFile($_.FullName) }
}
Get-ChildItem -Path 'C:\Images' -Filter *.jpg -Recurse | Get-Image | ? { $_.Width -gt 1280 -or $_.Height -gt 1280 }
Problem is, this returns me a list of Image objects.
I basically want a list of file objects (which ultimately will be images) with a width OR height greater than 1280 pixels.
I need to somehow convert the image object back to a file object ?
The ultimatum is a list of filenames which are larger than 1280 pixels.