Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
smiley
Posts: 1,417
Registered: ‎07-14-2008
My Device: Z10
My Carrier: Fido

camera picture wrong orientation on dev unit vs z10

On my Dev B unit when I take a picture from the filepicker dialog the picture is saved correctly but when I run the app on the actual Z10 the picture is save in landscape even though the phone is in portrait mode.

 

anyone have this problem?

 

Please use plain text.
BlackBerry Development Advisor
PBernhardt
Posts: 740
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: camera picture wrong orientation on dev unit vs z10

This could be an orientation issue. Pictures get tagged using the app orientation, so if your app is locked into portrait mode and you take a picture while in landscape, the image will get tagged as portrait.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Please use plain text.
Developer
meego_man
Posts: 189
Registered: ‎11-25-2012
My Device: BlackBerry Dev Alpha B

Re: camera picture wrong orientation on dev unit vs z10

Unfortunately pictures are never get tagged properly even with the original camera app. They are just properly rotated in most cases (upside down orientation seem doesn't work). 

 

"so if your app is locked into portrait mode and you take a picture while in landscape, the image will get tagged as portrait." 

 

 is it a bug or design decision?

Please use plain text.
BlackBerry Development Advisor
PBernhardt
Posts: 740
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: camera picture wrong orientation on dev unit vs z10

It's the result of some design decisions, so it's technically "by design" and not just a coding error, but obviously not ideal and something we are going to fix.

 

I'm not sure what you mean in the first paragraph though. Are the pictures being saved and displayed correctly when taken by the camera app or not?

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Please use plain text.
Developer
meego_man
Posts: 189
Registered: ‎11-25-2012
My Device: BlackBerry Dev Alpha B

Re: camera picture wrong orientation on dev unit vs z10

"I'm not sure what you mean in the first paragraph though. Are the pictures being saved and displayed correctly when taken by the camera app or not?"

 

  They are saved and displayed correctly by all apps because they physically re-oriented into correct position and EXIF tag for orientation has always value of 1. I also used the word "almost", because if the picture is taken when the device is oriented upside down then picture is saved as it was taken in landscape mode. It seems that camera app is not able to detect flipped portrait orientation at all. 

 

"but obviously not ideal and something we are going to fix"  this is a worrying sign :smileyhappy: If you start fixing things then all our workarounds will become bugs :smileyhappy:

Please use plain text.
BlackBerry Development Advisor
PBernhardt
Posts: 740
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: camera picture wrong orientation on dev unit vs z10

Yeah, upside-down is not a supported orientation for the platform at all, so any pictures taken while upside down are not going to be tagged correctly.

 

When it works, whether the picture is actually physically rotated or if it's just tagged as rotated can depend on the device. Orientation can be a tricky subject :smileyhappy:

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Please use plain text.
Developer
meego_man
Posts: 189
Registered: ‎11-25-2012
My Device: BlackBerry Dev Alpha B

Re: camera picture wrong orientation on dev unit vs z10

"When it works, whether the picture is actually physically rotated or if it's just tagged as rotated can depend on the device."

 

   Ouch, that's even more worrying. Would be great to have some uniformity :smileyhappy: 

 

"Orientation can be a tricky subject"

 

 not  sure what do you mean. BlackBerry devices have orientation sensor (or even gyroscope), the only thing is needed  here is to write that orientation into Exif header :smileyhappy: Of course the horizontal orientation is the one that may bring lots of troubles (screen pointing upwards or downwards), but all standard orientations are simple :smileyhappy:

Please use plain text.