linux提取图片EXIF数据

435 阅读1分钟

什么是EXIF

​ 可交换图像文件格式常被简称为Exif(Exchangeable image file format),是专门为数码相机的照片设定的,可以记录数码照片的属性信息和拍摄数据。Exif 可以被附加在 JPEG、TIFF、RIFF 等文件之中,为其增加有关数码相机拍摄信息的内容和缩略图或图像处理软件的一些版本信息。

安装
apt install exiftool
使用
➜  exiftool 截图_选择区域_20221025085555.png    
ExifTool Version Number         : 11.16  
File Name                       : 截图_选择区域_20221025085555.png  
Directory                       : .  
File Size                       : 169 kB  
File Modification Date/Time     : 2022:10:25 08:55:55+08:00  
File Access Date/Time           : 2023:01:09 13:20:26+08:00  
File Inode Change Date/Time     : 2022:10:26 16:55:17+08:00  
File Permissions                : rw-r--r--  
File Type                       : PNG  
File Type Extension             : png  
MIME Type                       : image/png  
Image Width                     : 1336  
Image Height                    : 756  
Bit Depth                       : 8  
Color Type                      : RGB  
Compression                     : Deflate/Inflate  
Filter                          : Adaptive  
Interlace                       : Noninterlaced  
Pixels Per Unit X               : 3780  
Pixels Per Unit Y               : 3780  
Pixel Units                     : meters  
Image Size                      : 1336x756  
Megapixels                      : 1.0

参考链接

www.jianshu.com/p/d76457799…