Skip to main content
Participating Frequently
July 20, 2011
질문

AIR for iOS / CameraRoll & CameraUI : How to know if a picture is in portrait or landscape mode ?

  • July 20, 2011
  • 4 답변들
  • 8483 조회

Hello ~

I'm developping a photo app for iphone/ipad.

I used basic technic from adobe documentation for that, no problem (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/CameraUI.html), I'm getting my bitmapData and then do what i want.

But problem is, ANY picture loaded from the CameraRoll is in portrait mode (for pictures taken with the camera)

So from that point i was thinking to check the exif data from the file. So i tried this http://blog.flexnroses.com/?p=95

But since in iOS we cannot acces the file path from mediaPromise, this script doesnt work.

I've been searching for a while about that, but no succes.

Does someone have any idea on iOS how to get the orientation of a picture taken with the camera ?

(Because yes, other pictures there is no problem, just comparing height and width gives you easily the orientation)

Cheers

이 주제는 답변이 닫혔습니다.

4 답변

Known Participant
October 7, 2015

OMG Adobe, that post was 2011. Are you committed to the AIR platform or not? I really don't get it and as an AIR developer I would love to know whether there's any longevity to this platform.

It seems that so much of my dev time is working around stupid holes or bugs in the API (don't get me started about text/type).

When is Adobe going to address this obvious defect in their implementation of CameraRoll access for iOS? Why all the ridiculous workarounds? Thanks to all the great folk who have provided solutions, but this is completely outrageous.

The bitmap that is returned by contentLoaderInfo.content should be in the correct orientation! Exactly the way it is in the native photo browser when you look at that image. End of story. There is no other use case that makes any sense at all.

Bugs I understand. Leaving big bugs unaddressed for 4 years is completely inexcusable, if they want to send the message to developers that the AIR platform is a viable platform for growth in mobile development. Otherwise hello (insert any JS+HTML5+NativeLib framework here).

PLEASE VOTE ON THIS BUG: Bug#4070057 - CameraRoll on iOS returns Bitmap in incorrect orientation

Known Participant
December 10, 2014

Do  we still need to read the EXIF data to fix the image orientation issues or is there a simpler solution available?

Inspiring
July 20, 2011

Same question, multiple threads...

http://forums.adobe.com/thread/875157?tstart=0

http://forums.adobe.com/message/3794248#3794248

I hope Adobe will try to add this in the next big release.. At least, give us access to the exif of the loaded file... The information is there, but you don't show it

WeLoveKimchi작성자
Participating Frequently
July 22, 2011

Yes, it would be great !

Because sounds so basic, and natural.

As you said several threads are about that, i shouldnt have created a new one, so i will remove it ~

You can find some new informations here

http://forums.adobe.com/message/3814004#3814004

Inspiring
October 3, 2011

Does the AIR 3 SDK do anything to help this issue?

Community Manager
July 20, 2011

On iOS, MediaPromise is null. You need to load the image asynchronously from the MediaPromise itself. See http://blogs.adobe.com/cantrell/archives/2011/02/how-to-use-cameraui-in-a-cross-platform-way.html for sample code.

Unfortunately, the library mentioned at the link doesn't return the EXIF information on iOS. At present, I don't have a solution for this problem.

Thanks,

Sanika

WeLoveKimchi작성자
Participating Frequently
July 20, 2011

Thats right and this is what i'm using now.

I'm really suprised that there is no api or libary for this yet for iPhone. This is something so basic.

Loading a picture and getting the good orientation ^^

I'm stuck !

Thanks anyway ~

Anyone ?