[FAQ20469]The Exif Makernote

The makernote is "a tag for manufacturers of Exif writers to record any desired information.

The following step shows how to enable the tag and put your additional information into makernote.
 
 
STEP1:ADD the tag EXIF_TAG_MAKERNOTE into the list exifTagID[]
/vendor/mediatek/proprietary/hardware/mtkcam/utils/exif/common/exif_type.h
 
#define EXIF_TAG_MAKERNOTE      0x927C

static unsigned short exifTagID[] = {
.......
EXIF_TAG_FOCALLEN,
EXIF_TAG_MAKERNOTE, // add EXIF_TAG_MAKERNOTE Tag 
/*EXIF_TAG_USRCOMMENT,*/
}
 
STEP2: Add the tag update function  
/vendor/mediatek/proprietary/hardware/mtkcam/utils/exif/common/exif_make.cpp

unsigned int
ExifUtils::exifTagUpdate(
 
//Add the tag update function
err = ifdListNodeModify(IFD_TYPE_EXIFIFD, EXIF_TAG_MAKERNOTE, XXXXXXXX);  //XXX The additional information you want
if (err != EXIF_NO_ERROR) {
MEXIF_LOGE("EXIF_TAG_MAKERNOTE FAIL(%x)", err);
return err;
      }
}
 
STEP3: Setup the buf size for your additional information  
 
enum ifdDataType {
IFD_DATATYPE_BYTE = 1,
IFD_DATATYPE_ASCII,
IFD_DATATYPE_SHORT,
IFD_DATATYPE_LONG,
IFD_DATATYPE_RATIONAL,
IFD_DATATYPE_UNDEFINED = 7,
IFD_DATATYPE_SLONG = 9,
IFD_DATATYPE_SRATIONAL = 10
};
 
vendor\mediatek\proprietary\hardware\mtkcam\utils\exif\common\Exif_ifdinit.cpp
 
unsigned int
ExifUtils::ifdExifIFDValInit
{
 
case EXIF_TAG_MAKERNOTE:   //Add
pifd->type = IFD_DATATYPE_UNDEFINED; //data type
pifd->count = 256; // Depend on your data to change the size. 
pifd->valoff = plist->valBufPos;
plist->valBufPos += 256; // Depend on your data to change the size. 
pdata += 256; // Depend on your data to change the size. 
break;
 
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值