Last active
December 14, 2015 13:59
-
-
Save u1tnk/5097541 to your computer and use it in GitHub Desktop.
画像ファイルのサイズ一覧からでかいの検出した
This file contains 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 | |
File.open('ids.txt') do |file| | |
while line = file.gets do | |
words = line.split(' ') | |
size = eval(words[1].gsub('x', '*')) | |
if size >= 640 * 960 | |
p(words) | |
end | |
end | |
end |
This file contains 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
find . -type f -name "*.jpg" | xargs identify | awk '{print $1 " " $3}' > ids.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment