-
libexif-master.tar.gz下载
资源介绍
libexif 读写自定义exif信息实例,详细说明见MyReadme.txt
1.编译库
运行libexif-mater 文件夹的mybuild_ubuntu.sh
运行后当前目录build的文件夹会有编译文件
ls build/
include lib share
2. 编译示例demo
cd contrib/examples/
./compile_exampale.sh
--------------------------------
test_jpeg_exif_new 写自定义exif 信息
read_jpeg_exif 读取写入的exif信息
写exif 信息使用:
用windows自带画图软件随便产生一个jpg文件或者使用自带的test.jpg文件
./test_jpeg_exif_new test.jpg test_exif.jpg
------------------------------------------------------
Add customer exif info for test.jpg ok! #正常会有这个输出
读取写入的exif信息:
./read_jpeg_exif test_exif.jpg
-------------->ExifInfo:test_exif.jps Start<--------------
======IFD: 0 0======
X-Resolution: 72
Y-Resolution: 72
Resolution Unit: Inch
======IFD: 1 1======
======IFD: 2 EXIF======
Exposure Time: 1/18 sec.
F-Number: f/4.0
ISO Speed Ratings: 60
Exposure Bias: 0.00 EV
Maximum Aperture Value: 4.00 EV (f/4.0)
Subject Distance: 0.0 m
Metering Mode: Pattern
Flash: Flash fired
Focal Length: 35.0 mm
Flash Energy: 65535
Exif Version: Exif Version 2.1
FlashPixVersion: FlashPix Version 1.0
Color Space: Uncalibrated
======IFD: 3 GPS======
North or South Latitude: W
Latitude: 38.0, 132897/0, 0/0, 0/0, 0/0, 0/0, 0/0, 0/0
East or West Longitude: N
Longitude: 9.0, 132833/0, 0/0, 0/0, 0/0, 0/0, 0/0, 0/0
======IFD: 4 Interoperability======
-------------->ExifInfo:test_exif.jps End<--------------