Berkeley CSUA MOTD:Entry 15301
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/12/25 [General] UID:1000 Activity:popular
12/25   

1999/1/26-29 [Computer/SW/Languages/Perl] UID:15301 Activity:moderate
1/26    Is there any command line utility that returns the width and height
        dimensions of an image file, specifically .jpg & .gif?
        \_ file foo.gif         --dbushong
           \_ Seems like it only prints the width and height of .gif files
              but not .jpg files.  Why?  -- yuen
              \_ Well, someone keeps deleting this, but again:
                 perldoc Image::Size.  If that's too tricky,
                 ~dbushong/bin/imgsize   --dbushong
              \_ Because someone like you didn't take the time to rewrite
                 it to do so.  What's up with everyone expecting everything
                 to be pre-written to do exactly what they need?  Do it
                 yourself, sheesh.
                 \_ Because chances are someone has written something to
                    do what you want. Why reinvent the wheel? And why
                    suppose the person has the time or knowledge to
                    accomplish the task?
                    \_ To ask if someone else has done it is differant than
                       asking why they haven't.  One is a query, the latter
                       is a whine.  I don't suppose they have the time or
                       skill.  I object to the whining not the desire to have
                       a feature.
                 \_ Well, since it knows to look into the file content to
                    find out if a file with no ".jpg" extension is a
                    JPEG file, I would think it also knows to look into the
                    JPEG file content to get the width and height. -- yuen
                    \_ Because the author didn't need this function and you
                       didn't add it.
           \_ Well, someone keeps deleting this, but again:  perldoc
              Image::Size.  If that's too tricky, ~dbushong/bin/imgsize
              --dbushong