|
|
@ -676,7 +676,8 @@ namespace Exiv2 {
|
|
|
|
bool bFlir = option == kpsRecursive && marker == (app0_+1) && std::strcmp(signature,"FLIR")==0;
|
|
|
|
bool bFlir = option == kpsRecursive && marker == (app0_+1) && std::strcmp(signature,"FLIR")==0;
|
|
|
|
bool bExif = option == kpsRecursive && marker == (app0_+1) && std::strcmp(signature,"Exif")==0;
|
|
|
|
bool bExif = option == kpsRecursive && marker == (app0_+1) && std::strcmp(signature,"Exif")==0;
|
|
|
|
bool bMPF = option == kpsRecursive && marker == (app0_+2) && std::strcmp(signature,"MPF")==0;
|
|
|
|
bool bMPF = option == kpsRecursive && marker == (app0_+2) && std::strcmp(signature,"MPF")==0;
|
|
|
|
if( bFlir || bExif || bMPF ) {
|
|
|
|
bool bPS = option == kpsRecursive && std::strcmp(signature,"Photoshop 3.0")==0;
|
|
|
|
|
|
|
|
if( bFlir || bExif || bMPF || bPS ) {
|
|
|
|
// extract Exif data block which is tiff formatted
|
|
|
|
// extract Exif data block which is tiff formatted
|
|
|
|
if ( size > 0 ) {
|
|
|
|
if ( size > 0 ) {
|
|
|
|
out << std::endl;
|
|
|
|
out << std::endl;
|
|
|
@ -717,14 +718,36 @@ namespace Exiv2 {
|
|
|
|
// << " index = " << pFFF->dwIndexOff << std::endl;
|
|
|
|
// << " index = " << pFFF->dwIndexOff << std::endl;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// create a copy on write memio object with the data, then print the structure
|
|
|
|
if ( bPS ) {
|
|
|
|
BasicIo::AutoPtr p = BasicIo::AutoPtr(new MemIo(exif+start,size-start));
|
|
|
|
uint32_t i = 0 ;
|
|
|
|
if ( start < max ) TiffImage::printTiffStructure(*p,out,option,depth);
|
|
|
|
byte* bytes = exif;
|
|
|
|
|
|
|
|
DataBuf dataBuf(bytes,size);
|
|
|
|
|
|
|
|
while ( i < size-3 && exif[i] != 0x1c ) i++;
|
|
|
|
|
|
|
|
depth++;
|
|
|
|
|
|
|
|
out << " Record | DataSet | Name | Length | Data" << std::endl;
|
|
|
|
|
|
|
|
while ( bytes[i] == 0x1c && i < size-3 ) {
|
|
|
|
|
|
|
|
char buff[100];
|
|
|
|
|
|
|
|
uint16_t record = bytes[i+1];
|
|
|
|
|
|
|
|
uint16_t dataset = bytes[i+2];
|
|
|
|
|
|
|
|
uint16_t len = getUShort(bytes+i+3,bigEndian);
|
|
|
|
|
|
|
|
sprintf(buff," %6d | %7d | %-24s | %6d | ",record,dataset, Exiv2::IptcDataSets::dataSetName(dataset,record).c_str(), len);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
out << buff << Internal::binaryToString(dataBuf,len,i+5) << std::endl;
|
|
|
|
|
|
|
|
i += 5 + len;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
depth--;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// create a copy on write memio object with the data, then print the structure
|
|
|
|
|
|
|
|
BasicIo::AutoPtr p = BasicIo::AutoPtr(new MemIo(exif+start,size-start));
|
|
|
|
|
|
|
|
if ( start < max ) TiffImage::printTiffStructure(*p,out,option,depth);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// restore and clean up
|
|
|
|
// restore and clean up
|
|
|
|
io_->seek(restore,Exiv2::BasicIo::beg);
|
|
|
|
io_->seek(restore,Exiv2::BasicIo::beg);
|
|
|
|
delete [] exif;
|
|
|
|
delete [] exif;
|
|
|
|
bLF = false;
|
|
|
|
bLF = false;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|