Can I, with the CameraRollExtended ANE, get the EXIFF data to know the orientation of a File loaded with a media Promise (and not selected from the camera roll).
If not, do you have another ANE that can do it? Thanks.
My code to load the data is as follows:
Then, I don't know how to use the ANE to know the orientation of the loaded BitmapData. Is it even possible?
Thanks.
private function prepareCapturedImage():void
{
var mediaPromise:MediaPromise = Data.CAPTURED_IMAGE_MEDIA_PROMISE;
var imageLoader:Loader = new Loader();
if (mediaPromise.isAsync)
{
trace("Asynchronous media promise.");
var loaderContext:LoaderContext = new LoaderContext();
loaderContext.imageDecodingPolicy = ImageDecodingPolicy.ON_LOAD; //For improved performance.
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onMediaPromiseLoaded);
imageLoader.addEventListener(IOErrorEvent.IO_ERROR, onImageLoadError);
imageLoader.loadFilePromise(mediaPromise);
}
else
{
trace("Synchronous media promise.");
imageLoader.loadFilePromise(mediaPromise);
sendImageToEncoder(Bitmap(LoaderInfo(imageLoader.loaderInfo).content).bitmapData);
}
}
private function onMediaPromiseLoaded(e:flash.events.Event):void
{
var mpLoaderInfo:LoaderInfo = e.target as LoaderInfo;
mpLoaderInfo.removeEventListener(Event.COMPLETE, onMediaPromiseLoaded);
mpLoaderInfo.loader.removeEventListener(IOErrorEvent.IO_ERROR, onMediaPromiseLoadError);
originalImageBitmapData = Bitmap(mpLoaderInfo.loader.content).bitmapData;
trace ("** [onMediaPromiseLoaded] >> originalImageBitmapData.width: " + originalImageBitmapData.width);
trace ("** [onMediaPromiseLoaded] >> originalImageBitmapData.height: " + originalImageBitmapData.height);
}
Hi,
Can I, with the CameraRollExtended ANE, get the EXIFF data to know the orientation of a File loaded with a media Promise (and not selected from the camera roll).
If not, do you have another ANE that can do it? Thanks.
My code to load the data is as follows:
Then, I don't know how to use the ANE to know the orientation of the loaded BitmapData. Is it even possible?
Thanks.