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

Web and WebWorks Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Contributor
Posts: 7
Registered: ‎04-17-2013
My Device: z10
My Carrier: Rogers

Portrait images get rotated 90 degrees

Hi,

 

I noticed something changed recently with the Z10. The camera sample app located here

 

https://github.com/blackberry/BB10-WebWorks-Samples

 

invokes the camera app and used to show pictures taken in portrait mode (vertical camera position) in a vertial portait position. Now the pictures are rotated 90 degrees. When I view the picture on the OS it is okay, portrait vertical. 

 

Is anybody else experiencing this issue? I am on software release 10.1.0.295.

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Portrait images get rotated 90 degrees

Hi there, I've confirmed this issue on the latest OS (and that it didn't exist on previous OS versions.)

I've filed a bug report with our development teams to have this looked at. It seems to be an OS-level issue at this time.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
New Contributor
Posts: 7
Registered: ‎03-02-2012
My Device: 9900
My Carrier: AT&T

Re: Portrait images get rotated 90 degrees

I'm having the same issues with Cascades ....

BlackBerry Development Advisor
Posts: 769
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: Portrait images get rotated 90 degrees

You guys may want to take a look at my EXIF sample. It'll show you how to read an image's meta-data to determine with way the image is stored on the device, and how to rotate it to your desired orientation.

 

EXIF Data Reader: https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/EXIF-Data-Reader

 

Also, you can simply set "imageCrop: true" when you invoke the camera. That will popup the native photo editor where the user can crop, and rotate the image as they choose. For some apps this is great, but really depends on what you're doing with the photo in your app.

New Contributor
Posts: 7
Registered: ‎04-17-2013
My Device: z10
My Carrier: Rogers

Re: Portrait images get rotated 90 degrees

Hi Chad,

 

I wasn't able to call imageCrop:true when invoking the Camera. It works when I invoke the FilePicker but not the Camera. Are you able to get this working with the Camera? If so can you please provide a code sample?

New Contributor
Posts: 7
Registered: ‎04-17-2013
My Device: z10
My Carrier: Rogers

Re: Portrait images get rotated 90 degrees

The imageCrop:true option is currently not available with the Camera card. A feature request has been filed for this.

 

https://github.com/blackberry/BB10-WebWorks-Framework/issues/657

New Contributor
Posts: 7
Registered: ‎02-19-2013
My Device: Z10
My Carrier: O2

Re: Portrait images get rotated 90 degrees

+1 - Am having same issue. Suggestion: When camera orientation = Portrait, Capture saves image with correct rotation. that way we wouldn't have to implement extra code to display img the way user intended. Given most photos on Q10 will likely be taken in Portrait - this is also a strong argument for not rotating on save.

Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Portrait images get rotated 90 degrees

Obvious comment

 

Take the image with the camera then display / manipulate it in WebWorks

 

For example you could shove it on a Canvas then use the powerful features of Canvas to do a PhotoShop-esque app with ease

 

CSS3's tranforms make this even easier

 

We've got a superb Camera app - make it do something new Smiley Happy




Click the like button if you find my posts useful!
Highlighted
BlackBerry Development Advisor
Posts: 769
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: Portrait images get rotated 90 degrees

So that's right, the imageCrop is only available via the FilePicker.  Second option would be to do as suggested, use the EXIF sample, detect which way the image  is stored, and rotate accordingly.  If you need to save a physical copy of said image, you'll want to actually rotate it on the canvas (which the sample shows).  If you just wish to display the image inside your app then you can get away with simple rotating it via CSS.

Developer
Posts: 33
Registered: ‎10-29-2013
My Device: BB10
My Carrier: TMO

Re: Portrait images get rotated 90 degrees

Hi Chad,

Can you please update the link to your EXIF app. I can't find it anymore in git. Thanks