Created
June 20, 2013 19:51
-
-
Save robink/5826038 to your computer and use it in GitHub Desktop.
Get an image file resolution from the command line. Requires Imagemagick. Protip: add it in your PATH with +x chmod.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
out = IO.popen('identify ' + ARGV[0]) | |
puts out.readlines.join().split(' ')[2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice!