exif

非压缩格式使用tiff结构, 包含0/1 ifd.

压缩格式的使用app1/2来包含exif属性信息。app1包含tiff结构的信息, app2包含flashpix扩展。一个app的长度不超过64kb, 多个app2用于表示超过64kb的数据。

ifd由12字节的tag域组成

tag id (2b)

type(2b)

count(4b)

offset(4b)

Type
The following types are used in Exif:
1 = BYTE An 8-bit unsigned integer.,
2 = ASCII An 8-bit byte containing one 7-bit ASCII code. The final byte is terminated with NULL.,
3 = SHORT A 16-bit (2-byte) unsigned integer,
4 = LONG A 32-bit (4-byte) unsigned integer,
5 = RATIONAL Two LONGs. The first LONG is the numerator and the second LONG expresses the
denominator.,
7 = UNDEFINED An 8-bit byte that can take any value depending on the field definition,
9 = SLONG A 32-bit (4-byte) signed integer (2's complement notation),
10 = SRATIONAL Two SLONGs. The first SLONG is the numerator and the second SLONG is the
denominator.

count记录value的数量, 和type一起决定tag的value的长度

value offset是相对于tiff header到value被记录的位置。

In
cases where the value fits in 4 bytes, the value itself is recorded. If the value is smaller than 4 bytes, the value is
stored in the 4-byte area starting from the left, i.e., from the lower end of the byte offset area. For example, in big
endian format, if the type is SHORT and the value is 1, it is recorded as 00010000.H.

exif ifd: tag:0x8769(exif属性)

gps ifd: tag:0x8825

Interoperability IFD: tag:0xa005(在exif ifd中)

mpo的由多个有soi/eoi组成的image组成。每个里面包含app1/app2和image, app1包含exif属性, app2包含mp扩展信息。

第一张soi/eoi的app2包含mp index ifd, 指出后面的image的偏移量, 其他image只包含mp attribute ifd,

比较重要的tag有w,h, 方向, makernote, 等。

offset往往是相对于相应的header来讲的。

除第一张以外的其它image的offset是相对于第一张图的app2的marker之后的字节开始的。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值