Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there a command that can read image attributes , I only need it's height / width.

share|improve this question
    
do you want metadata extraction –  Ringtail Apr 9 '12 at 4:29
add comment

1 Answer

up vote 1 down vote accepted

you could try file or more advanced command identify from ImageMagic packet.

share|improve this answer
    
Good one , I never thought file can extract those info as well –  warl0ck Apr 9 '12 at 4:30
    
@warl0ck I'd still use identify though, as it's much easier to get the data you want. read -r width height < <(identify -format "%w %h" "$imagefile") –  geirha Apr 10 '12 at 6:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.