How to get exif information out of a photo with a simple utility.

Posted: March 29, 2017. At: 10:39 AM. This was 10 months ago. Post ID: 10411
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

The exif command for Linux allows a user to get exif information from a camera image. This example below shows the sample output from this command.

└──╼ $exif waterfall.jpg 
EXIF tags in 'waterfall.jpg' ('Intel' byte order):
Tag                 |Value
Manufacturer        |SAMSUNG
Model               |SM-N9005
Orientation         |Top-left
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Software            |GIMP 2.8.14
Date and Time       |2015:08:07 16:21:51
YCbCr Positioning   |Centered
Image Width         |512
Image Length        |384
Compression         |JPEG compression
Orientation         |Top-left
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Exposure Time       |1/558 sec.
F-Number            |f/2.2
Exposure Program    |Normal program
ISO Speed Ratings   |50
Exif Version        |Exif Version 2.2
Date and Time (Origi|2015:07:26 14:16:22
Date and Time (Digit|2015:07:26 14:16:22
Components Configura|Y Cb Cr -
Shutter Speed       |9.12 EV (1/556 sec.)
Aperture            |2.27 EV (f/2.2)
Brightness          |7.43 EV (590.84 cd/m^2)
Exposure Bias       |0.00 EV
Maximum Aperture Val|2.28 EV (f/2.2)
Metering Mode       |Center-weighted average
Light Source        |Unknown
Flash               |Flash did not fire
Focal Length        |4.1 mm
Maker Note          |98 bytes undefined data
User Comment        |
FlashPixVersion     |FlashPix Version 1.0
Color Space         |sRGB
Pixel X Dimension   |1366
Pixel Y Dimension   |1025
Sensing Method      |One-chip color area sensor
Scene Type          |Directly photographed
Exposure Mode       |Auto exposure
White Balance       |Auto white balance
Focal Length in 35mm|31
Scene Capture Type  |Standard
Image Unique ID     |D13QSGI01OA
GPS Tag Version     |
Interoperability Ind|R98
Interoperability Ver|0100
EXIF data contains a thumbnail (8551 bytes).

Since, this file contains a thumbnail, we can extract it like this.

└──╼ $exif waterfall.jpg -e
Wrote file 'waterfall.jpg.modified.jpeg'.

And I can grep for the camera model like this.

localhost% exif lake-albert.jpg | grep Model
Model               |DMC-FT2

This is very useful when downloading a photo from the Internet and it could contain useful information.

No comments have been made. Use this form to start the conversation :)

Leave a Reply