We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
How to use this lib to get the photo’s orientation:
import flash.utils.ByteArray;
import fox.photo.SimpleExifExtractor;
import fox.photo.exif.ifd.IFDValue;
import fox.photo.jpeg.Exif;
var orientation:int = -1;
var orientationId:int = 274;// in Exif2-2.PDF document, the orientation id is 274
var bytes:ByteArray = PhotoData;
var exif:Exif=SimpleExifExtractor.readExif(bytes);
var tag:IFDValue=exif.findTagById(orientationId);
if (tag) // in certain case, it might don’t have orientation infomation.
{
orientation=parseInt("" + tag.value);
}
trace('orientation is:'+orientation);