Skip to content

641i130/sortpic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sortpic

Image dimensions sorter

Huh?

This tool sorts picture files (jpg,png currently) based off of their dimensions. So if the image has a larger width value then its stored in the landscape folder, if its height is larger than the width then its stored in the portrait folder. Images within the difference buffer range of ~300 pixels are placed in the squareish folder.

./sortapic [directory to read images from and move into folders]

folders are created like:

[inputted dir]/portrait

[inputted dir]/landscape

[inputted dir]/squareish

But its poorly written

I wrote this in less than an hour just to challenge myself. Maybe I'll clean it up someday when I feel like it. Feel free to push anything that makes it faster!