Skip to content

IsLandscape.exe is a small command line utility that receives an image file as a parameter and returns 1 in the exit code if the image is in landscape format otherwise 0

Notifications You must be signed in to change notification settings

uhwgmxorg/IsLandscape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IsLandscape.exe

IsLandscape.exe is a small command line utility that gets an image file as parameter and returns 1 (errorcode) if the image is in landscape format and 0 if the image is in portrait format. To do this the exit() function is used for this.

img

An example of a lock screen photo from Microsoft (c)

img

and the portrait version from Microsoft (c)

img

The idea is to be able to distinguish, for example, in a batch between a picture whether it is in landscape or portrait format. An example of a batch file:

@ECHO OFF
SETLOCAL EnableDelayedExpansion
FOR /r %%i IN (.\*.jpg) DO (
  %OneDrive%\Bat\IsLandscape.exe %%i
    IF !ERRORLEVEL! EQU 1 ECHO %%i is LANDSCAPE
    IF !ERRORLEVEL! EQU 0 DEL %%i
)

The prerequisites for compiling the project are VS 2017 Windows 10 SDK from 10.0.18362.0 to 10.0.17134.0 or you can download a signed Exe version on uhwgmxorg.com here

About

IsLandscape.exe is a small command line utility that receives an image file as a parameter and returns 1 in the exit code if the image is in landscape format otherwise 0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published