package jp.shichiseki.exif { import flash.utils.ByteArray; /** * The IFD class represents an IFD in the Exif. * The IFD contains some IFDEntry which contain the information about the JPEG file. * You can get all IFDEntry information using following an example: *
tagID, and returns
* the IFD which matched the ID.
* @param tagID A tagID.
*/
public function getEntryByTagID(tagID:uint):IFDEntry {
for each (var e:IFDEntry in entries) {
if (e.tagID == tagID)
return e;
}
return null;
}
/**
* Searches for an IFD by using tagName, and returns
* the IFD which mached the name.
* @param tagName A tag name.
*/
public function getEntryByTagName(tagName:String):IFDEntry {
for each (var e:IFDEntry in entries) {
if (e.tagName == tagName)
return e;
}
return e;
}
private function readIFDEntries(stream:ByteArray, offset:uint):void {
entries = new Array();
for (var i:uint = 0; i < numEnt; i++) {
var entry:IFDEntry = new IFDEntry(stream, tagSet, offset);
if (entry.data) {
this[entry.tagName] = entry.data;
}
entries.push(entry);
}
}
}
}
.