• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

CameraUI orientation

Engaged ,
Jul 12, 2011 Jul 12, 2011

Copy link to clipboard

Copied

Is there a way to know the orientation of a picture taken with the CameraUI in AIR 2.7 (iOS or Android)? Air seems to assume that the picture is in landscape orientation but it's not always true. The information is in the EXIF data but loaders doesnt seems to give access to EXIF data.

It is a problem if you want to display the picture in your application... The orientation will be wrong...

I dont want to use an AS3 custom library because most of them will crash the app on IOS because they try to call forbidden methods...

So, any method in the API allow me to do this? Any workaround that doesnt imply an AS3 library?

TOPICS
Performance issues

Views

2.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Jul 20, 2011 Jul 20, 2011

The following information comes from one of Adobe's quality engineers. (Note that the ExifInfo library mentioned is the same as used in the flexnroses blog post example.)

>So I found that the image that we get after using CameraRoll/CameraUI  does contain EXIF information but not in the format expected by the  ExifInfo AS3 library (http://code.shichiseki.jp/as3/ExifInfo/).

Firstly, it does contain the orientation information which I am able to  verify using the Jpeg decoding tool :  http://www.i

...

Votes

Translate

Translate
Adobe Employee ,
Jul 13, 2011 Jul 13, 2011

Copy link to clipboard

Copied

Hi,

This is currently not possible without the use of an external library. Which ones have you tried?

Thanks,

Sanika

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 13, 2011 Jul 13, 2011

Copy link to clipboard

Copied

I didnt try a library for EXIF because I must implement some more important features first. If I get enough time to try libraries and find one that work on iOS, I will give you a feedback.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 20, 2011 Jul 20, 2011

Copy link to clipboard

Copied

Like you i'm looking for a solution ~

One is working well http://blog.flexnroses.com/?p=95

But since MediaPromise problem with iOS it only works on Android.

Shame ~

Did you find something ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 20, 2011 Jul 20, 2011

Copy link to clipboard

Copied

What is the mediapromise problem on iOS?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jul 20, 2011 Jul 20, 2011

Copy link to clipboard

Copied

The following information comes from one of Adobe's quality engineers. (Note that the ExifInfo library mentioned is the same as used in the flexnroses blog post example.)

>So I found that the image that we get after using CameraRoll/CameraUI  does contain EXIF information but not in the format expected by the  ExifInfo AS3 library (http://code.shichiseki.jp/as3/ExifInfo/).

Firstly, it does contain the orientation information which I am able to  verify using the Jpeg decoding tool :  http://www.impulseadventure.com/photo/jpeg-snoop-source.html.

The Exif data is stored in one of JPEG’s defined utility Application  Segments APPn. The AS3 library - ExifInfo that you are using for reading  Exif header expects APP1 marker whereas the actual image has APP0 at  that place followed by APP1 segment which contains the orientation data.  Images that comply to JFIF standards have APP0 marker just after SOI  (Start of Image) and images that comply to EXIF standards should have  APP1 marker after SOI.

As per wiki http://en.wikipedia.org/wiki/JPEG_File_Interchange_Format :  "many programs and digital cameras produce files with both application  segments included" which is what exactly happens in our case.

So I think you may try switching to a library which is able to parse an  image that has multiple APPn markers and read only the one required. You  can even modify the ExifInfo library.

Hope this helps.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 20, 2011 Jul 20, 2011

Copy link to clipboard

Copied

Thx for the info.

I won't have time to do this since it's not a major issue in my case but if I do it in the future, I will publish my results.

I hope Adobe will try to include an universal exif reader in AIR in a future release since it's a bit complex and force everyone who need to display photos to use an external library, modify it, read the exif and modify the picture just to display the photo in the right orientation...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 29, 2012 Aug 29, 2012

Copy link to clipboard

Copied

LATEST

it's over a year later.. is there s solution to this yet?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines